// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
inline bool IsData() { return WaitForRead(0, 0); };
inline bool IsDisconnected() const { return !IsConnected(); };
inline wxUint32 LastCount() const { return m_lcount; }
inline bool IsData() { return WaitForRead(0, 0); };
inline bool IsDisconnected() const { return !IsConnected(); };
inline wxUint32 LastCount() const { return m_lcount; }
wxSocketBase& Write(const void *buffer, wxUint32 nbytes);
wxSocketBase& WriteMsg(const void *buffer, wxUint32 nbytes);
wxSocketBase& Write(const void *buffer, wxUint32 nbytes);
wxSocketBase& WriteMsg(const void *buffer, wxUint32 nbytes);
bool Wait(long seconds = -1, long milliseconds = 0);
bool WaitForRead(long seconds = -1, long milliseconds = 0);
bool WaitForWrite(long seconds = -1, long milliseconds = 0);
bool Wait(long seconds = -1, long milliseconds = 0);
bool WaitForRead(long seconds = -1, long milliseconds = 0);
bool WaitForWrite(long seconds = -1, long milliseconds = 0);
// event handling
void *GetClientData() const { return m_clientData; }
void SetClientData(void *data) { m_clientData = data; }
// event handling
void *GetClientData() const { return m_clientData; }
void SetClientData(void *data) { m_clientData = data; }
- wxSocketBase* Accept(bool wait = TRUE);
- bool AcceptWith(wxSocketBase& socket, bool wait = TRUE);
+ wxSocketBase* Accept(bool wait = true);
+ bool AcceptWith(wxSocketBase& socket, bool wait = true);
- DECLARE_EVENT_TABLE_ENTRY( wxEVT_SOCKET, id, -1, \
- (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxSocketEventFunction, & func ), \
- (wxObject *) NULL ),
+ wx__DECLARE_EVT1(wxEVT_SOCKET, id, wxSocketEventHandler(func))