1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Purpose: GSocket Unix header
6 * -------------------------------------------------------------------------
12 #ifndef __GSOCKET_STANDALONE__
16 #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
18 #ifndef __GSOCKET_STANDALONE__
19 #include "wx/gsocket.h"
27 #endif /* __cplusplus */
38 /* Definition of GSocket */
51 unsigned long m_timeout
;
54 GSocketEventFlags m_detected
;
55 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
56 char *m_data
[GSOCK_MAX_EVENT
];
58 char *m_gui_dependent
;
60 /* Function pointers */
61 struct GSocketBaseFunctionsTable
*m_functions
;
64 /* Definition of GAddress */
67 struct sockaddr
*m_addr
;
70 GAddressType m_family
;
78 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
79 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
80 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
81 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
82 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
83 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
87 int _GSocket_GUI_Init(void);
88 void _GSocket_GUI_Cleanup(void);
90 int _GSocket_GUI_Init_Socket(GSocket
*socket
);
91 void _GSocket_GUI_Destroy_Socket(GSocket
*socket
);
93 void _GSocket_Enable_Events(GSocket
*socket
);
94 void _GSocket_Disable_Events(GSocket
*socket
);
95 void _GSocket_Install_Callback(GSocket
*socket
, GSocketEvent event
);
96 void _GSocket_Uninstall_Callback(GSocket
*socket
, GSocketEvent event
);
98 void _GSocket_Enable(GSocket
*socket
, GSocketEvent event
);
99 void _GSocket_Disable(GSocket
*socket
, GSocketEvent event
);
100 void _GSocket_Detected_Read(GSocket
*socket
);
101 void _GSocket_Detected_Write(GSocket
*socket
);
105 GSocketError
_GAddress_translate_from(GAddress
*address
,
106 struct sockaddr
*addr
, int len
);
107 GSocketError
_GAddress_translate_to (GAddress
*address
,
108 struct sockaddr
**addr
, int *len
);
109 GSocketError
_GAddress_Init_INET(GAddress
*address
);
110 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);
115 #endif /* __cplusplus */
117 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
119 #endif /* __GSOCK_UNX_H */