]>
git.saurik.com Git - wxWidgets.git/blob - src/unix/gsockunx.h
1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Purpose: GSocket Unix header
6 * -------------------------------------------------------------------------
11 #include <wx/gsocket.h>
13 /* Definition of GSocket */
16 GAddress
*m_local
, *m_peer
;
19 bool m_blocking
, m_server
, m_stream
, m_oriented
;
20 unsigned long m_timeout
;
23 GSocketCallback m_fbacks
[GSOCK_MAX_EVENT
];
24 char *m_data
[GSOCK_MAX_EVENT
];
26 /* IO calls associated */
27 bool m_iocalls
[GSOCK_MAX_EVENT
];
29 char *m_gui_dependent
;
32 /* Definition of GAddress */
34 struct sockaddr
*m_addr
;
37 GAddressType m_family
;
43 void _GSocket_Enable(GSocket
*socket
, GSocketEvent event
);
44 void _GSocket_Disable(GSocket
*socket
, GSocketEvent event
);
45 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
46 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
47 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
48 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
49 void _GSocket_Install_Callback(GSocket
*socket
, GSocketEvent count
);
50 void _GSocket_Uninstall_Callback(GSocket
*socket
, GSocketEvent count
);
51 void _GSocket_Detected_Read(GSocket
*socket
);
52 void _GSocket_Detected_Write(GSocket
*socket
);
53 void _GSocket_GUI_Init(GSocket
*socket
);
54 void _GSocket_GUI_Destroy(GSocket
*socket
);
56 /* Translaters returns false when memory is exhausted */
57 GSocketError
_GAddress_translate_from(GAddress
*address
,
58 struct sockaddr
*addr
, int len
);
59 GSocketError
_GAddress_translate_to(GAddress
*address
,
60 struct sockaddr
**addr
, int *len
);
62 /* Initialisers returns FALSE when an error happened in the initialisation */
64 /* Internet address family */
65 GSocketError
_GAddress_Init_INET(GAddress
*address
);
66 /* Local address family */
67 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);