1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Copyright: (c) Guilhem Lavaux
5 * Licence: wxWindows Licence
6 * Purpose: GSocket Macintosh header
8 * -------------------------------------------------------------------------
14 #ifndef __GSOCKET_STANDALONE__
18 #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
20 #ifndef __GSOCKET_STANDALONE__
21 #include "wx/gsocket.h"
29 #endif /* __cplusplus */
31 typedef GSocket
* GSocketPtr
;
33 /* Definition of GSocket */
36 wxMacNotifierTableRef m_mac_events
;
37 EndpointRef m_endpoint
;
46 unsigned long m_timeout
;
49 GSocketEventFlags m_detected
;
50 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
51 char *m_data
[GSOCK_MAX_EVENT
];
55 /* Definition of GAddress */
61 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_Events(GSocket
*socket
);
77 void _GSocket_Disable_Events(GSocket
*socket
);
78 void _GSocket_Internal_Proc(unsigned long e
, void* data
) ;
82 GSocketError
_GAddress_translate_from(GAddress
*address
,
84 GSocketError
_GAddress_translate_to(GAddress
*address
,
87 GSocketError
_GAddress_Init_INET(GAddress
*address
);
91 #endif /* __cplusplus */
93 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
95 #endif /* __GSOCK_UNX_H */