-#ifdef __SALFORDC__
-protected:
-#endif
-
- bool _Wait(long seconds, long microseconds, int type);
-
- // Set "my" handler
- inline virtual void SetHandler(wxSocketHandler *handler)
- { m_handler = handler; }
-
- // Activate or disactivate callback
- void SetupCallbacks();
- void DestroyCallbacks();
-
- // Pushback library
- size_t GetPushback(char *buffer, size_t size, bool peek);
-
- // To prevent many read or write on the same socket at the same time
- // ==> cause strange things :-)
- void WantSpeedBuffer(char *buffer, size_t size, wxRequestEvent req);
- void WantBuffer(char *buffer, size_t size, wxRequestEvent req);
-
- virtual bool DoRequests(wxRequestEvent req);
+private:
+ friend class wxSocketClient;
+ friend class wxSocketServer;
+ friend class wxDatagramSocket;
+
+ // low level IO
+ wxUint32 _Read(void* buffer, wxUint32 nbytes);
+ wxUint32 _Write(const void *buffer, wxUint32 nbytes);
+ bool _Wait(long seconds, long milliseconds, wxSocketEventFlags flags);
+
+ // pushback buffer
+ void Pushback(const void *buffer, wxUint32 size);
+ wxUint32 GetPushback(void *buffer, wxUint32 size, bool peek);
+
+private:
+ // socket
+ GSocket *m_socket; // GSocket
+ wxSocketType m_type; // wxSocket type
+
+ // state
+ wxSocketFlags m_flags; // wxSocket flags
+ bool m_connected; // connected?
+ bool m_establishing; // establishing connection?
+ bool m_reading; // busy reading?
+ bool m_writing; // busy writing?
+ bool m_error; // did last IO call fail?
+ wxSocketError m_lasterror; // last error (not cleared on success)
+ wxUint32 m_lcount; // last IO transaction size
+ unsigned long m_timeout; // IO timeout value
+ wxList m_states; // stack of states
+ bool m_interrupt; // interrupt ongoing wait operations?
+ bool m_beingDeleted; // marked for delayed deletion?
+
+ // pushback buffer
+ void *m_unread; // pushback buffer
+ wxUint32 m_unrd_size; // pushback buffer size
+ wxUint32 m_unrd_cur; // pushback pointer (index into buffer)
+
+ // events
+ int m_id; // socket id
+ wxEvtHandler *m_handler; // event handler
+ void *m_clientData; // client data for events
+ bool m_notify; // notify events to users?
+ wxSocketEventFlags m_eventmask; // which events to notify?
+
+ // the initialization count, GSocket is initialized if > 0
+ static size_t m_countInit;
+
+ // callbacks are deprecated, use events instead
+#if WXWIN_COMPATIBILITY
+ wxSockCbk m_cbk; // callback
+ char *m_cdata; // callback data
+#endif // WXWIN_COMPATIBILITY