- bool m_connected, m_connecting; // State of the socket
- int m_fd; // Socket file descriptors
- wxList m_states; // States list
- int m_id; // Socket id (for event handler)
- wxSocketHandler *m_handler; // the current socket handler
- wxRequestNotify m_neededreq; // Specify which requet signals we need
- unsigned long m_timeout;
- size_t m_lcount; // Last IO request size
- int m_error; // Last IO error
- wxSocketInternal *m_internal;
- char *m_unread; // Pushback buffer
- size_t m_unrd_size; // Pushback buffer size
- wxSockCbk m_cbk;
- char *m_cdata;
- bool m_notify_state;
-
+ wxSocketEventFlags m_neededreq; // Event mask
+ bool m_notify_state; // Notify events to users?
+ 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
+
+ char *m_unread; // Pushback buffer
+ wxUint32 m_unrd_size; // Pushback buffer size
+ wxUint32 m_unrd_cur; // Pushback pointer (index into buffer)
+
+ // Async IO variables
+ enum
+ {
+ NO_DEFER = 0,
+ DEFER_READ = 1,
+ DEFER_WRITE = 2
+ } 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
+
+/*
+ char *m_read_buffer; // Target buffer (read)
+ char *m_write_buffer; // Target buffer (write)
+ wxUint32 m_read_nbytes; // Buffer size (read)
+ wxUint32 m_write_nbytes; // Buffer size (write)
+ wxTimer *m_read_timer; // Timer (read)
+ wxTimer *m_write_timer; // Timer (write)
+*/
+
+ wxSockCbk m_cbk; // C callback
+ char *m_cdata; // C callback data
+