]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/unix/gsockunx.h
1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Purpose: GSocket Unix header
6 * -------------------------------------------------------------------------
15 #include "wx/gsocket.h"
19 #endif /* __cplusplus */
22 /* Definition of GSocket */
25 GAddress
*m_local
, *m_peer
;
28 bool m_non_blocking
, m_server
, m_stream
, m_oriented
;
30 unsigned long m_timeout
;
33 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
34 char *m_data
[GSOCK_MAX_EVENT
];
36 /* IO calls associated */
37 bool m_iocalls
[GSOCK_MAX_EVENT
];
39 char *m_gui_dependent
;
42 /* Definition of GAddress */
44 struct sockaddr
*m_addr
;
47 GAddressType m_family
;
53 void _GSocket_Enable(GSocket
*socket
, GSocketEvent event
);
54 void _GSocket_Disable(GSocket
*socket
, GSocketEvent event
);
55 void _GSocket_Configure_Callbacks(GSocket
*socket
);
56 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
57 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
58 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
59 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
60 void _GSocket_Install_Callback(GSocket
*socket
, GSocketEvent count
);
61 void _GSocket_Uninstall_Callback(GSocket
*socket
, GSocketEvent count
);
62 void _GSocket_Detected_Read(GSocket
*socket
);
63 void _GSocket_Detected_Write(GSocket
*socket
);
64 void _GSocket_GUI_Init(GSocket
*socket
);
65 void _GSocket_GUI_Destroy(GSocket
*socket
);
67 /* Translaters returns false when memory is exhausted */
68 GSocketError
_GAddress_translate_from(GAddress
*address
,
69 struct sockaddr
*addr
, int len
);
70 GSocketError
_GAddress_translate_to(GAddress
*address
,
71 struct sockaddr
**addr
, int *len
);
73 /* Initialisers returns FALSE when an error happened in the initialisation */
75 /* Internet address family */
76 GSocketError
_GAddress_Init_INET(GAddress
*address
);
77 /* Local address family */
78 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);
82 #endif /* __cplusplus */