Added Get/SetClientData to wxSocketBase and wxSocketEvent
Some other deprecated functions & co.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6516
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// base IO
virtual bool Close();
wxSocketBase& Discard();
// base IO
virtual bool Close();
wxSocketBase& Discard();
- wxSocketBase& Peek(char* buffer, wxUint32 nbytes);
- wxSocketBase& Read(char* buffer, wxUint32 nbytes);
- wxSocketBase& ReadMsg(char *buffer, wxUint32 nbytes);
- wxSocketBase& Unread(const char *buffer, wxUint32 nbytes);
- wxSocketBase& Write(const char *buffer, wxUint32 nbytes);
- wxSocketBase& WriteMsg(const char *buffer, wxUint32 nbytes);
+ wxSocketBase& Peek(void* buffer, wxUint32 nbytes);
+ wxSocketBase& Read(void* buffer, wxUint32 nbytes);
+ wxSocketBase& ReadMsg(void *buffer, wxUint32 nbytes);
+ wxSocketBase& Unread(const void *buffer, wxUint32 nbytes);
+ wxSocketBase& Write(const void *buffer, wxUint32 nbytes);
+ wxSocketBase& WriteMsg(const void *buffer, wxUint32 nbytes);
void InterruptAllWaits() { m_interrupt = TRUE; };
bool Wait(long seconds = -1, long milliseconds = 0);
void InterruptAllWaits() { m_interrupt = TRUE; };
bool Wait(long seconds = -1, long milliseconds = 0);
bool WaitForWrite(long seconds = -1, long milliseconds = 0);
bool WaitForLost(long seconds = -1, long milliseconds = 0);
bool WaitForWrite(long seconds = -1, long milliseconds = 0);
bool WaitForLost(long seconds = -1, long milliseconds = 0);
- inline wxSocketFlags GetFlags() const { return m_flags; };
+ inline wxSocketFlags GetFlags() const { return m_flags; }
void SetFlags(wxSocketFlags flags);
void SetTimeout(long seconds);
// event handling
void SetFlags(wxSocketFlags flags);
void SetTimeout(long seconds);
// event handling
+ void *GetClientData() const { return m_clientData; }
+ void SetClientData(void *data) { m_clientData = data; }
void SetEventHandler(wxEvtHandler& handler, int id = -1);
void SetNotify(wxSocketEventFlags flags);
void Notify(bool notify);
void SetEventHandler(wxEvtHandler& handler, int id = -1);
void SetNotify(wxSocketEventFlags flags);
void Notify(bool notify);
friend class wxDatagramSocket;
// low level IO
friend class wxDatagramSocket;
// low level IO
- wxUint32 _Read(char* buffer, wxUint32 nbytes);
- wxUint32 _Write(const char *buffer, wxUint32 nbytes);
+ wxUint32 _Read(void* buffer, wxUint32 nbytes);
+ wxUint32 _Write(const void *buffer, wxUint32 nbytes);
bool _Wait(long seconds, long milliseconds, wxSocketEventFlags flags);
// pushback buffer
bool _Wait(long seconds, long milliseconds, wxSocketEventFlags flags);
// pushback buffer
- void Pushback(const char *buffer, wxUint32 size);
- wxUint32 GetPushback(char *buffer, wxUint32 size, bool peek);
+ void Pushback(const void *buffer, wxUint32 size);
+ wxUint32 GetPushback(void *buffer, wxUint32 size, bool peek);
private:
GSocket *m_socket; // GSocket
private:
GSocket *m_socket; // GSocket
bool m_beingDeleted; // marked for delayed deletion?
// pushback buffer
bool m_beingDeleted; // marked for delayed deletion?
// pushback buffer
- char *m_unread; // pushback buffer
+ void *m_unread; // pushback buffer
wxUint32 m_unrd_size; // pushback buffer size
wxUint32 m_unrd_cur; // pushback pointer (index into buffer)
// events
wxUint32 m_unrd_size; // pushback buffer size
wxUint32 m_unrd_cur; // pushback pointer (index into buffer)
// events
- wxEvtHandler *m_handler; // event handler
+ wxEvtHandler *m_handler; // event handler
+ void *m_clientData; // client data for events
bool m_notify_state; // notify events to users?
bool m_notify_state; // notify events to users?
- wxSocketEventFlags
- m_neededreq; // event mask
+ wxSocketEventFlags m_neededreq; // event mask
+
+ // callbacks - deprecated, avoid if possible
wxSockCbk m_cbk; // callback
char *m_cdata; // callback data
};
wxSockCbk m_cbk; // callback
char *m_cdata; // callback data
};
wxDatagramSocket(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket& RecvFrom( wxSockAddress& addr,
wxDatagramSocket(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE);
wxDatagramSocket& RecvFrom( wxSockAddress& addr,
wxUint32 nBytes );
wxDatagramSocket& SendTo( wxSockAddress& addr,
wxUint32 nBytes );
wxDatagramSocket& SendTo( wxSockAddress& addr,
public:
wxSocketEvent(int id = 0);
public:
wxSocketEvent(int id = 0);
- wxSocketNotify SocketEvent() const { return m_event; }
- wxSocketBase *Socket() const { return m_socket; }
+ wxSocketNotify GetSocketEvent() const { return m_event; }
+ wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); }
+ void *GetClientData() const { return m_clientData; }
+
+ // backwards compatibility
+ wxSocketNotify SocketEvent() const { return m_event; }
+ wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); }
void CopyObject(wxObject& object_dest) const;
public:
wxSocketNotify m_event;
void CopyObject(wxObject& object_dest) const;
public:
wxSocketNotify m_event;
- wxSocketBase *m_socket;
#define EVT_SOCKET(id, func) { wxEVT_SOCKET, id, -1, \
(wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func, \
#define EVT_SOCKET(id, func) { wxEVT_SOCKET, id, -1, \
(wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func, \
buf2 = new char[len];
m_text->AppendText(_("Sending a test buffer to the server ..."));
buf2 = new char[len];
m_text->AppendText(_("Sending a test buffer to the server ..."));
- m_sock->Write((char *)&len, 1);
+ m_sock->Write(&len, 1);
m_sock->Write(buf1, len);
m_text->AppendText(m_sock->Error() ? _("failed !\n") : _("done\n"));
m_sock->Write(buf1, len);
m_text->AppendText(m_sock->Error() ? _("failed !\n") : _("done\n"));
buf1[i] = (char)(i % 256);
m_text->AppendText(_("Sending a large buffer (32K) to the server ..."));
buf1[i] = (char)(i % 256);
m_text->AppendText(_("Sending a large buffer (32K) to the server ..."));
- m_sock->Write((char *)&len, 1);
+ m_sock->Write(&len, 1);
m_sock->Write(buf1, len * 1024);
m_text->AppendText(m_sock->Error() ? _("failed !\n") : _("done\n"));
m_sock->Write(buf1, len * 1024);
m_text->AppendText(m_sock->Error() ? _("failed !\n") : _("done\n"));
void MyFrame::OnDatagram(wxCommandEvent& WXUNUSED(event))
{
void MyFrame::OnDatagram(wxCommandEvent& WXUNUSED(event))
{
- m_text->AppendText(_("=== Datagram test begins ===\n"));
+ m_text->AppendText(_("\n=== Datagram test begins ===\n"));
m_text->AppendText(_("Sorry, not implemented\n"));
m_text->AppendText(_("=== Datagram test ends ===\n"));
}
m_text->AppendText(_("Sorry, not implemented\n"));
m_text->AppendText(_("=== Datagram test ends ===\n"));
}
sock->SetFlags(wxSOCKET_WAITALL);
sock->SetFlags(wxSOCKET_WAITALL);
- sock->Read((char *)&len, 1);
buf = new char[len];
sock->Read(buf, len);
buf = new char[len];
sock->Read(buf, len);
sock->SetFlags(wxSOCKET_WAITALL);
sock->SetFlags(wxSOCKET_WAITALL);
- sock->Read((char *)&len, 1);
buf = new char[len * 1024];
sock->Read(buf, len * 1024);
sock->Write(buf, len * 1024);
buf = new char[len * 1024];
sock->Read(buf, len * 1024);
sock->Write(buf, len * 1024);
// Which test are we going to run?
unsigned char c;
// Which test are we going to run?
unsigned char c;
- sock->Read((char *)&c ,1);
#include "wx/module.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/module.h"
#include "wx/log.h"
#include "wx/intl.h"
- #include "wx/event.h"
- #include "wx/gdicmn.h" // for wxPendingDelete
+ #include "wx/gdicmn.h" // for wxPendingDelete
#endif // wxUSE_GUI
#include "wx/sckaddr.h"
#endif // wxUSE_GUI
#include "wx/sckaddr.h"
#define MAX_DISCARD_SIZE (10 * 1024)
// what to do within waits
#define MAX_DISCARD_SIZE (10 * 1024)
// what to do within waits
-#define PROCESS_EVENTS() wxYield()
+#if wxUSE_GUI
+ #define PROCESS_EVENTS() wxYield()
+#else
+ #define PROCESS_EVENTS()
+#endif
// use wxPostEvent or not
#define USE_DELAYED_EVENTS 1
// use wxPostEvent or not
#define USE_DELAYED_EVENTS 1
// --------------------------------------------------------------------------
// ClassInfos
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ClassInfos
// --------------------------------------------------------------------------
m_unrd_cur = 0;
// events
m_unrd_cur = 0;
// events
+ m_handler = NULL;
+ m_clientData = NULL;
m_notify_state = FALSE;
m_neededreq = 0;
m_cbk = NULL;
m_cdata = NULL;
}
m_notify_state = FALSE;
m_neededreq = 0;
m_cbk = NULL;
m_cdata = NULL;
}
-wxSocketBase::wxSocketBase() { Init(); }
+wxSocketBase::wxSocketBase()
+{
+ Init();
+}
wxSocketBase::wxSocketBase(wxSocketFlags flags, wxSocketType type)
{
wxSocketBase::wxSocketBase(wxSocketFlags flags, wxSocketType type)
{
-wxSocketBase& wxSocketBase::Read(char* buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::Read(void* buffer, wxUint32 nbytes)
{
// Mask read events
m_reading = TRUE;
{
// Mask read events
m_reading = TRUE;
-wxUint32 wxSocketBase::_Read(char* buffer, wxUint32 nbytes)
+wxUint32 wxSocketBase::_Read(void* buffer, wxUint32 nbytes)
{
int total;
int ret = 1;
{
int total;
int ret = 1;
// Try the pushback buffer first
total = GetPushback(buffer, nbytes, FALSE);
nbytes -= total;
// Try the pushback buffer first
total = GetPushback(buffer, nbytes, FALSE);
nbytes -= total;
+ buffer = (char *)buffer + total;
// If the socket is invalid or we got all the data, return now
if (!m_socket || !nbytes)
// If the socket is invalid or we got all the data, return now
if (!m_socket || !nbytes)
if (m_flags & wxSOCKET_NOWAIT)
{
GSocket_SetNonBlocking(m_socket, TRUE);
if (m_flags & wxSOCKET_NOWAIT)
{
GSocket_SetNonBlocking(m_socket, TRUE);
- ret = GSocket_Read(m_socket, buffer, nbytes);
+ ret = GSocket_Read(m_socket, (char *)buffer, nbytes);
GSocket_SetNonBlocking(m_socket, FALSE);
if (ret > 0)
GSocket_SetNonBlocking(m_socket, FALSE);
if (ret > 0)
if (!(m_flags & wxSOCKET_BLOCK) && !WaitForRead())
break;
if (!(m_flags & wxSOCKET_BLOCK) && !WaitForRead())
break;
- ret = GSocket_Read(m_socket, buffer, nbytes);
+ ret = GSocket_Read(m_socket, (char *)buffer, nbytes);
if (ret > 0)
{
total += ret;
if (ret > 0)
{
total += ret;
+ buffer = (char *)buffer + ret;
{
if ((m_flags & wxSOCKET_BLOCK) || WaitForRead())
{
{
if ((m_flags & wxSOCKET_BLOCK) || WaitForRead())
{
- ret = GSocket_Read(m_socket, buffer, nbytes);
+ ret = GSocket_Read(m_socket, (char *)buffer, nbytes);
if (ret > 0)
total += ret;
if (ret > 0)
total += ret;
-wxSocketBase& wxSocketBase::ReadMsg(char* buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::ReadMsg(void* buffer, wxUint32 nbytes)
{
wxUint32 len, len2, sig, total;
bool error;
{
wxUint32 len, len2, sig, total;
bool error;
old_flags = m_flags;
SetFlags((m_flags & wxSOCKET_BLOCK) | wxSOCKET_WAITALL);
old_flags = m_flags;
SetFlags((m_flags & wxSOCKET_BLOCK) | wxSOCKET_WAITALL);
- if (_Read((char *)&msg, sizeof(msg)) != sizeof(msg))
+ if (_Read(&msg, sizeof(msg)) != sizeof(msg))
- sig = (wxUint32)msg.sig[0];
+ sig = (wxUint32)msg.sig[0];
sig |= (wxUint32)(msg.sig[1] << 8);
sig |= (wxUint32)(msg.sig[2] << 16);
sig |= (wxUint32)(msg.sig[3] << 24);
sig |= (wxUint32)(msg.sig[1] << 8);
sig |= (wxUint32)(msg.sig[2] << 16);
sig |= (wxUint32)(msg.sig[3] << 24);
if (len2 != 0)
goto exit;
}
if (len2 != 0)
goto exit;
}
- if (_Read((char *)&msg, sizeof(msg)) != sizeof(msg))
+ if (_Read(&msg, sizeof(msg)) != sizeof(msg))
goto exit;
sig = (wxUint32)msg.sig[0];
goto exit;
sig = (wxUint32)msg.sig[0];
-wxSocketBase& wxSocketBase::Peek(char* buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::Peek(void* buffer, wxUint32 nbytes)
{
// Mask read events
m_reading = TRUE;
{
// Mask read events
m_reading = TRUE;
-wxSocketBase& wxSocketBase::Write(const char *buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::Write(const void *buffer, wxUint32 nbytes)
{
// Mask write events
m_writing = TRUE;
{
// Mask write events
m_writing = TRUE;
-wxUint32 wxSocketBase::_Write(const char *buffer, wxUint32 nbytes)
+wxUint32 wxSocketBase::_Write(const void *buffer, wxUint32 nbytes)
{
wxUint32 total = 0;
int ret = 1;
{
wxUint32 total = 0;
int ret = 1;
if (m_flags & wxSOCKET_NOWAIT)
{
GSocket_SetNonBlocking(m_socket, TRUE);
if (m_flags & wxSOCKET_NOWAIT)
{
GSocket_SetNonBlocking(m_socket, TRUE);
- ret = GSocket_Write(m_socket, buffer, nbytes);
+ ret = GSocket_Write(m_socket, (const char *)buffer, nbytes);
GSocket_SetNonBlocking(m_socket, FALSE);
if (ret > 0)
GSocket_SetNonBlocking(m_socket, FALSE);
if (ret > 0)
if (!(m_flags & wxSOCKET_BLOCK) && !WaitForWrite())
break;
if (!(m_flags & wxSOCKET_BLOCK) && !WaitForWrite())
break;
- ret = GSocket_Write(m_socket, buffer, nbytes);
+ ret = GSocket_Write(m_socket, (const char *)buffer, nbytes);
if (ret > 0)
{
total += ret;
if (ret > 0)
{
total += ret;
+ buffer = (const char *)buffer + ret;
{
if ((m_flags & wxSOCKET_BLOCK) || WaitForWrite())
{
{
if ((m_flags & wxSOCKET_BLOCK) || WaitForWrite())
{
- ret = GSocket_Write(m_socket, buffer, nbytes);
+ ret = GSocket_Write(m_socket, (const char *)buffer, nbytes);
if (ret > 0)
total = ret;
if (ret > 0)
total = ret;
-wxSocketBase& wxSocketBase::WriteMsg(const char *buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::WriteMsg(const void *buffer, wxUint32 nbytes)
{
wxUint32 total;
bool error;
int old_flags;
{
wxUint32 total;
bool error;
int old_flags;
unsigned char sig[4];
unsigned char len[4];
} msg;
unsigned char sig[4];
unsigned char len[4];
} msg;
msg.len[2] = (unsigned char) ((nbytes >> 16) & 0xff);
msg.len[3] = (unsigned char) ((nbytes >> 24) & 0xff);
msg.len[2] = (unsigned char) ((nbytes >> 16) & 0xff);
msg.len[3] = (unsigned char) ((nbytes >> 24) & 0xff);
- if (_Write((char *)&msg, sizeof(msg)) < sizeof(msg))
+ if (_Write(&msg, sizeof(msg)) < sizeof(msg))
goto exit;
total = _Write(buffer, nbytes);
goto exit;
total = _Write(buffer, nbytes);
msg.sig[3] = (unsigned char) 0xde;
msg.len[0] = msg.len[1] = msg.len[2] = msg.len[3] = (char) 0;
msg.sig[3] = (unsigned char) 0xde;
msg.len[0] = msg.len[1] = msg.len[2] = msg.len[3] = (char) 0;
- if ((_Write((char *)&msg, sizeof(msg))) < sizeof(msg))
+ if ((_Write(&msg, sizeof(msg))) < sizeof(msg))
goto exit;
// everything was OK
goto exit;
// everything was OK
-wxSocketBase& wxSocketBase::Unread(const char *buffer, wxUint32 nbytes)
+wxSocketBase& wxSocketBase::Unread(const void *buffer, wxUint32 nbytes)
{
if (nbytes != 0)
Pushback(buffer, nbytes);
{
if (nbytes != 0)
Pushback(buffer, nbytes);
// --------------------------------------------------------------------------
// Callbacks (now obsolete - use events instead)
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Callbacks (now obsolete - use events instead)
// --------------------------------------------------------------------------
}
// --------------------------------------------------------------------------
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
-// All events (INPUT, OUTPUT, CONNECTION, LOST) are now always
-// internally watched; but users will only be notified of those
-// events they are interested in.
+// Callback function from GSocket. All events are internally
+// monitored, but users only get these they are interested in.
static void LINKAGEMODE wx_socket_callback(GSocket * WXUNUSED(socket),
static void LINKAGEMODE wx_socket_callback(GSocket * WXUNUSED(socket),
char *cdata)
{
wxSocketBase *sckobj = (wxSocketBase *)cdata;
char *cdata)
{
wxSocketBase *sckobj = (wxSocketBase *)cdata;
- sckobj->OnRequest((wxSocketNotify)event);
-}
-
-void wxSocketBase::SetNotify(wxSocketEventFlags flags)
-{
- m_neededreq = flags;
+ sckobj->OnRequest((wxSocketNotify) notify);
-void wxSocketBase::Notify(bool notify)
-{
- m_notify_state = notify;
-}
void wxSocketBase::OnRequest(wxSocketNotify req_evt)
{
void wxSocketBase::OnRequest(wxSocketNotify req_evt)
{
- wxSocketEventFlags flag = -1;
-
- switch (req_evt)
- {
- case GSOCK_INPUT: flag = GSOCK_INPUT_FLAG; break;
- case GSOCK_OUTPUT: flag = GSOCK_OUTPUT_FLAG; break;
- case GSOCK_CONNECTION: flag = GSOCK_CONNECTION_FLAG; break;
- case GSOCK_LOST: flag = GSOCK_LOST_FLAG; break;
- }
-
// This duplicates some code in _Wait, but this doesn't
// hurt. It has to be here because we don't know whether
// the Wait functions will be used, and it has to be in
// This duplicates some code in _Wait, but this doesn't
// hurt. It has to be here because we don't know whether
// the Wait functions will be used, and it has to be in
+ // Schedule the event
+
+ wxSocketEventFlags flag = -1;
+ switch (req_evt)
+ {
+ case GSOCK_INPUT: flag = GSOCK_INPUT_FLAG; break;
+ case GSOCK_OUTPUT: flag = GSOCK_OUTPUT_FLAG; break;
+ case GSOCK_CONNECTION: flag = GSOCK_CONNECTION_FLAG; break;
+ case GSOCK_LOST: flag = GSOCK_LOST_FLAG; break;
+ }
+
if (((m_neededreq & flag) == flag) && m_notify_state)
{
if (((m_neededreq & flag) == flag) && m_notify_state)
{
- if (m_handler)
- {
- wxSocketEvent event(m_id);
- event.m_socket = this;
- event.m_event = req_evt;
+ wxSocketEvent event(m_id);
+
+ event.m_event = req_evt;
+ event.m_clientData = m_clientData;
+ event.SetEventObject(this);
- wxPostEvent(m_handler, event);
+ m_handler->AddPendingEvent(event);
#else
m_handler->ProcessEvent(event);
#endif
#else
m_handler->ProcessEvent(event);
#endif
if (m_cbk)
m_cbk(*this, req_evt, m_cdata);
}
}
if (m_cbk)
m_cbk(*this, req_evt, m_cdata);
}
}
+void wxSocketBase::Notify(bool notify)
+{
+ m_notify_state = notify;
+}
+
+void wxSocketBase::SetNotify(wxSocketEventFlags flags)
+{
+ m_neededreq = flags;
+}
+
void wxSocketBase::SetEventHandler(wxEvtHandler& handler, int id)
{
m_handler = &handler;
m_id = id;
}
void wxSocketBase::SetEventHandler(wxEvtHandler& handler, int id)
{
m_handler = &handler;
m_id = id;
}
// --------------------------------------------------------------------------
// Pushback buffer
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Pushback buffer
// --------------------------------------------------------------------------
-void wxSocketBase::Pushback(const char *buffer, wxUint32 size)
+void wxSocketBase::Pushback(const void *buffer, wxUint32 size)
{
if (!size) return;
if (m_unread == NULL)
{
if (!size) return;
if (m_unread == NULL)
- m_unread = (char *)malloc(size);
+ m_unread = malloc(size);
- tmp = (char *)malloc(m_unrd_size + size);
- memcpy(tmp+size, m_unread, m_unrd_size);
+ tmp = malloc(m_unrd_size + size);
+ memcpy((char *)tmp + size, m_unread, m_unrd_size);
free(m_unread);
m_unread = tmp;
free(m_unread);
m_unread = tmp;
memcpy(m_unread, buffer, size);
}
memcpy(m_unread, buffer, size);
}
-wxUint32 wxSocketBase::GetPushback(char *buffer, wxUint32 size, bool peek)
+wxUint32 wxSocketBase::GetPushback(void *buffer, wxUint32 size, bool peek)
{
if (!m_unrd_size)
return 0;
{
if (!m_unrd_size)
return 0;
if (size > (m_unrd_size-m_unrd_cur))
size = m_unrd_size-m_unrd_cur;
if (size > (m_unrd_size-m_unrd_cur))
size = m_unrd_size-m_unrd_cur;
- memcpy(buffer, (m_unread+m_unrd_cur), size);
+ memcpy(buffer, (char *)m_unread + m_unrd_cur, size);
// ==========================================================================
// ==========================================================================
// ==========================================================================
// --------------------------------------------------------------------------
// ==========================================================================
// --------------------------------------------------------------------------
}
wxDatagramSocket& wxDatagramSocket::RecvFrom( wxSockAddress& addr,
}
wxDatagramSocket& wxDatagramSocket::RecvFrom( wxSockAddress& addr,
wxUint32 nBytes )
{
Read(buf, nBytes);
wxUint32 nBytes )
{
Read(buf, nBytes);
}
wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
}
wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
wxUint32 nBytes )
{
GSocket_SetPeer(m_socket, addr.GetAddress());
wxUint32 nBytes )
{
GSocket_SetPeer(m_socket, addr.GetAddress());
wxEvent::CopyObject(object_dest);
wxEvent::CopyObject(object_dest);
- event->m_event = m_event;
- event->m_socket = m_socket;
+ event->m_event = m_event;
+ event->m_clientData = m_clientData;