1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Purpose: GSocket Macintosh 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 */
29 typedef GSocket
* GSocketPtr
;
31 /* Definition of GSocket */
34 wxMacNotifierTableRef m_mac_events
;
35 EndpointRef m_endpoint
;
44 unsigned long m_timeout
;
47 GSocketEventFlags m_detected
;
48 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
49 char *m_data
[GSOCK_MAX_EVENT
];
53 /* Definition of GAddress */
59 GAddressType m_family
;
65 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
66 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
67 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
68 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
69 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
70 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
74 void _GSocket_Enable_Events(GSocket
*socket
);
75 void _GSocket_Disable_Events(GSocket
*socket
);
76 void _GSocket_Internal_Proc(unsigned long e
, void* data
) ;
80 GSocketError
_GAddress_translate_from(GAddress
*address
,
82 GSocketError
_GAddress_translate_to(GAddress
*address
,
85 GSocketError
_GAddress_Init_INET(GAddress
*address
);
89 #endif /* __cplusplus */
91 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
93 #endif /* __GSOCK_UNX_H */