]> git.saurik.com Git - wxWidgets.git/blame - src/unix/gsockunx.h
wxMemoryStream doc updated
[wxWidgets.git] / src / unix / gsockunx.h
CommitLineData
dbd300df
GL
1/* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
3 * Name: gsockunx.h
4 * Purpose: GSocket Unix header
5 * CVSID: $Id$
6 * -------------------------------------------------------------------------
7 */
a324a7bc
GL
8#ifndef __GSOCK_UNX_H
9#define __GSOCK_UNX_H
10
11#include <wx/gsocket.h>
12
13/* Definition of GSocket */
14struct _GSocket {
15 int m_fd;
16 GAddress *m_local, *m_peer;
17 GSocketError m_error;
18
19 bool m_blocking, m_server, m_stream, m_oriented;
39b91eca 20 unsigned long m_timeout;
a324a7bc 21
39b91eca
GL
22 /* Callbacks */
23 GSocketCallback m_fbacks[GSOCK_MAX_EVENT];
a324a7bc
GL
24 char *m_data[GSOCK_MAX_EVENT];
25
26 /* IO calls associated */
27 bool m_iocalls[GSOCK_MAX_EVENT];
28
29 char *m_gui_dependent;
30};
31
32/* Definition of GAddress */
33struct _GAddress {
34 struct sockaddr *m_addr;
35 size_t m_len;
36
37 GAddressType m_family;
38 int m_realfamily;
39
40 GSocketError m_error;
41};
42
43void _GSocket_Enable(GSocket *socket, GSocketEvent event);
44void _GSocket_Disable(GSocket *socket, GSocketEvent event);
45int _GSocket_Recv_Stream(GSocket *socket, char *buffer, int size);
46int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size);
47int _GSocket_Send_Stream(GSocket *socket, const char *buffer, int size);
48int _GSocket_Send_Dgram(GSocket *socket, const char *buffer, int size);
39b91eca
GL
49void _GSocket_Install_Callback(GSocket *socket, GSocketEvent count);
50void _GSocket_Uninstall_Callback(GSocket *socket, GSocketEvent count);
a324a7bc
GL
51void _GSocket_Detected_Read(GSocket *socket);
52void _GSocket_Detected_Write(GSocket *socket);
53void _GSocket_GUI_Init(GSocket *socket);
54void _GSocket_GUI_Destroy(GSocket *socket);
55void _GAddress_translate_from(GAddress *address,
56 struct sockaddr *addr, int len);
57void _GAddress_translate_to(GAddress *address,
58 struct sockaddr **addr, int *len);
59
60/* Internet address family */
61void _GAddress_Init_INET(GAddress *address);
62/* Local address family */
63void _GAddress_Init_UNIX(GAddress *address);
64
65#endif