1 /* -------------------------------------------------------------------------
2 * Project: GSocket (Generic Socket) for WX
4 * Purpose: GSocket MSW header
6 * -------------------------------------------------------------------------
12 #ifndef __GSOCKET_STANDALONE__
16 #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
18 #ifndef __GSOCKET_STANDALONE__
19 #include "wx/gsocket.h"
24 #if defined(__BORLANDC__)
33 /* Definition of GSocket */
46 struct timeval m_timeout
;
49 GSocketEventFlags m_detected
;
50 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
51 char *m_data
[GSOCK_MAX_EVENT
];
55 /* Definition of GAddress */
58 struct sockaddr
*m_addr
;
61 GAddressType m_family
;
70 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
71 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
72 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
73 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
74 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
75 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
79 void _GSocket_Enable_Events(GSocket
*socket
);
80 void _GSocket_Disable_Events(GSocket
*socket
);
81 LRESULT CALLBACK
_GSocket_Internal_WinProc(HWND
, UINT
, WPARAM
, LPARAM
);
85 GSocketError
_GAddress_translate_from(GAddress
*address
,
86 struct sockaddr
*addr
, int len
);
88 GSocketError
_GAddress_translate_to(GAddress
*address
,
89 struct sockaddr
**addr
, int *len
);
91 GSocketError
_GAddress_Init_INET(GAddress
*address
);
92 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);
98 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
100 #endif /* __GSOCK_MSW_H */