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"
31 /* Definition of GSocket */
44 struct timeval m_timeout
;
47 GSocketEventFlags m_detected
;
48 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
49 char *m_data
[GSOCK_MAX_EVENT
];
53 /* Definition of GAddress */
56 struct sockaddr
*m_addr
;
59 GAddressType m_family
;
67 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
68 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
69 GSocketError
_GSocket_Connect_Timeout(GSocket
*socket
);
70 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
71 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
72 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
73 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
77 bool _GSocket_GUI_Init(GSocket
*socket
);
78 void _GSocket_GUI_Destroy(GSocket
*socket
);
80 LRESULT CALLBACK
_GSocket_Internal_WinProc(HWND
, UINT
, WPARAM
, LPARAM
);
82 void _GSocket_Enable_Events(GSocket
*socket
);
83 void _GSocket_Disable_Events(GSocket
*socket
);
87 GSocketError
_GAddress_translate_from(GAddress
*address
,
88 struct sockaddr
*addr
, int len
);
89 GSocketError
_GAddress_translate_to (GAddress
*address
,
90 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 */