- GSocket *m_socket; // wxSocket socket
- wxSockFlags m_flags; // wxSocket flags
- wxSockType m_type; // wxSocket type
- wxSocketEventFlags m_neededreq; // Specify which requet signals we need
- wxUint32 m_lcount; // Last IO request size
- unsigned long m_timeout; // IO timeout value
-
- char *m_unread; // Pushback buffer
- wxUint32 m_unrd_size; // Pushback buffer size
- wxUint32 m_unrd_cur; // Pushback pointer
-
- wxSockCbk m_cbk; // C callback
- char *m_cdata; // C callback data
-
- bool m_connected; // Connected ?
- bool m_notify_state; // Notify state
- int m_id; // Socket id (for event handler)
-
- // Defering variables
- enum {
- DEFER_READ, DEFER_WRITE, NO_DEFER
- } m_defering; // Defering state
- char *m_defer_buffer; // Defering target buffer
- wxUint32 m_defer_nbytes; // Defering buffer size
- wxTimer *m_defer_timer; // Timer for defering mode
-
- wxList m_states; // Stack of states
+ GSocket *m_socket; // GSocket
+ wxEvtHandler *m_evt_handler; // event handler
+ int m_id; // Socket id (for event handler)
+
+ // Attributes
+ wxSockFlags m_flags; // wxSocket flags
+ wxSockType m_type; // wxSocket type
+ wxSocketEventFlags m_neededreq; // Event mask
+ bool m_notify_state; // Notify events to users?
+
+ // State
+ 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?
+ 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
+ char *m_unread; // Pushback buffer
+ wxUint32 m_unrd_size; // Pushback buffer size
+ wxUint32 m_unrd_cur; // Pushback pointer (index into buffer)
+
+ // Callback
+ wxSockCbk m_cbk; // C callback
+ char *m_cdata; // C callback data