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 */
30 /* Definition of GSocket */
43 unsigned long m_timeout
;
46 GSocketEventFlags m_detected
;
47 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
48 char *m_data
[GSOCK_MAX_EVENT
];
50 char *m_gui_dependent
;
53 /* Definition of GAddress */
56 struct sockaddr
*m_addr
;
59 GAddressType m_family
;
67 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
68 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
69 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
70 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
71 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
72 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
76 void _GSocket_Enable(GSocket
*socket
, GSocketEvent event
);
77 void _GSocket_Disable(GSocket
*socket
, GSocketEvent event
);
78 void _GSocket_Detected_Read(GSocket
*socket
);
79 void _GSocket_Detected_Write(GSocket
*socket
);
81 void _GSocket_GUI_Init(GSocket
*socket
);
82 void _GSocket_GUI_Destroy(GSocket
*socket
);
83 void _GSocket_Enable_Events(GSocket
*socket
);
84 void _GSocket_Disable_Events(GSocket
*socket
);
85 void _GSocket_Install_Callback(GSocket
*socket
, GSocketEvent event
);
86 void _GSocket_Uninstall_Callback(GSocket
*socket
, GSocketEvent event
);
90 GSocketError
_GAddress_translate_from(GAddress
*address
,
91 struct sockaddr
*addr
, int len
);
92 GSocketError
_GAddress_translate_to (GAddress
*address
,
93 struct sockaddr
**addr
, int *len
);
94 GSocketError
_GAddress_Init_INET(GAddress
*address
);
95 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);
100 #endif /* __cplusplus */
102 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
104 #endif /* __GSOCK_UNX_H */