+ friend class wxSocketServer;
+ friend class wxDatagramSocket;
+
+ // low level IO
+ wxUint32 DoRead(void* buffer, wxUint32 nbytes);
+ wxUint32 DoWrite(const void *buffer, wxUint32 nbytes);
+
+ // wait until the given flags are set for this socket or the given timeout
+ // (or m_timeout) expires
+ //
+ // notice that wxSOCKET_LOST_FLAG is always taken into account but the return
+ // value depends on whether it is included in flags or not: if it is, and the
+ // connection is indeed lost, true is returned, but if it isn't then the
+ // function returns false in this case
+ //
+ // false is always returned if we returned because of the timeout expiration
+ bool DoWait(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
+ wxSocketImpl *m_impl; // port-specific implementation
+ 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?
+ bool m_closed; // was the other end closed?
+ // (notice that m_error is also set then)
+ wxUint32 m_lcount; // last IO transaction size
+ unsigned long m_timeout; // IO timeout value in seconds
+ wxList m_states; // stack of states
+ bool m_interrupt; // interrupt ongoing wait operations?
+ bool m_beingDeleted; // marked for delayed deletion?
+ wxIPV4address m_localAddress; // bind to local address?
+
+ // 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;
+
+ DECLARE_NO_COPY_CLASS(wxSocketBase)
+};