continuation of GSocket/wxSocket merge: always create GSocket associated to a wxSocket instead of (always) doing it using a separate call later; remove support for user callbacks which wasn't implemented in Windows version and deprecated since 10 years or so

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-23 13:12:46 +00:00
parent 2d46f281a5
commit 53a161e101
6 changed files with 99 additions and 259 deletions

View File

@@ -27,16 +27,23 @@
class GSocket : public GSocketBase
{
public:
GSocket() : GSocketBase() { m_msgnumber = 0; }
GSocket::GSocket(wxSocketBase& wxsocket)
: GSocketBase(wxsocket)
{
m_msgnumber = 0;
}
virtual void Close();
virtual GSocket *WaitConnection(wxSocketBase& wxsocket);
virtual void Close();
GSocketError SetLocal(GAddress *address);
GSocketError SetPeer(GAddress *address);
GAddress *GetLocal();
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
// not used under MSW
void Notify(bool) { }
bool SetReusable();
@@ -47,11 +54,7 @@ public:
int Read(char *buffer, int size);
int Write(const char *buffer, int size);
void SetNonBlocking(bool non_block);
void SetTimeout(unsigned long millis);
GSocketError WXDLLIMPEXP_NET GetError();
void SetCallback(GSocketEventFlags flags,
GSocketCallback callback, char *cdata);
void UnsetCallback(GSocketEventFlags flags);
GSocketError GetSockOpt(int level, int optname,
void *optval, int *optlen);
GSocketError SetSockOpt(int level, int optname,