// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+
#ifndef _WX_NETWORK_SOCKET_H
#define _WX_NETWORK_SOCKET_H
#ifdef __GNUG__
-#pragma interface
+#pragma interface "socket.h"
#endif
// ---------------------------------------------------------------------------
virtual bool Connect(wxSockAddress& addr_man, bool wait = TRUE);
- bool WaitOnConnect(long seconds = -1);
+ bool WaitOnConnect(long seconds = -1, long microseconds = 0);
virtual void OnRequest(wxRequestEvent flags);
};
{
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__)