class WXDLLEXPORT wxSocketBase : public wxEvtHandler
{
DECLARE_CLASS(wxSocketBase)
+#ifdef __WXMAC__
+friend void wxMacSocketOnRequestProc(void *refcon , short event) ;
+#endif
public:
enum wxSockFlags { NONE=0, NOWAIT=1, WAITALL=2, SPEED=4 };
{
DECLARE_CLASS(wxSocketHandler)
protected:
- static wxSocketHandler *master;
#if defined(__WINDOWS__)
wxList *smsg_list;
struct wxSockHandlerInternal *internal;
public:
enum SockStatus { SOCK_NONE, SOCK_DATA, SOCK_CONNECT, SOCK_DISCONNECT,
SOCK_ERROR };
+ static wxSocketHandler *master;
wxSocketHandler();
virtual ~wxSocketHandler();
(wxSocketBase::wxSockFlags flags = wxSocketBase::NONE);
// Create or reuse a socket handler
- static wxSocketHandler& Master()
- { return *((master) ? (master) : (master = new wxSocketHandler())); }
+ static wxSocketHandler& Master() { return *master; }
#if defined(WXSOCK_INTERNAL) && defined(__WINDOWS__)
#define wxEVT_SOCKET wxEVT_FIRST+301
-#define EVT_SOCKET(id, func) { wxEVT_SOCKET, id, 0, (wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func },
+#define EVT_SOCKET(id, func) { wxEVT_SOCKET, id, 0, \
+ (wxObjectEventFunction) (wxEventFunction) (wxSocketEventFunction) & func, \
+ (wxObject *) NULL },
#endif