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"
39 /* Definition of GSocket */
53 struct timeval m_timeout
;
56 GSocketEventFlags m_detected
;
57 GSocketCallback m_cbacks
[GSOCK_MAX_EVENT
];
58 char *m_data
[GSOCK_MAX_EVENT
];
62 /* Definition of GAddress */
65 struct sockaddr
*m_addr
;
68 GAddressType m_family
;
76 GSocketError
_GSocket_Input_Timeout(GSocket
*socket
);
77 GSocketError
_GSocket_Output_Timeout(GSocket
*socket
);
78 GSocketError
_GSocket_Connect_Timeout(GSocket
*socket
);
79 int _GSocket_Recv_Stream(GSocket
*socket
, char *buffer
, int size
);
80 int _GSocket_Recv_Dgram(GSocket
*socket
, char *buffer
, int size
);
81 int _GSocket_Send_Stream(GSocket
*socket
, const char *buffer
, int size
);
82 int _GSocket_Send_Dgram(GSocket
*socket
, const char *buffer
, int size
);
86 int _GSocket_GUI_Init(void);
87 void _GSocket_GUI_Cleanup(void);
88 int _GSocket_GUI_Init_Socket(GSocket
*socket
);
89 void _GSocket_GUI_Destroy_Socket(GSocket
*socket
);
91 LRESULT CALLBACK
_GSocket_Internal_WinProc(HWND
, UINT
, WPARAM
, LPARAM
);
93 void _GSocket_Enable_Events(GSocket
*socket
);
94 void _GSocket_Disable_Events(GSocket
*socket
);
98 GSocketError
_GAddress_translate_from(GAddress
*address
,
99 struct sockaddr
*addr
, int len
);
100 GSocketError
_GAddress_translate_to (GAddress
*address
,
101 struct sockaddr
**addr
, int *len
);
102 GSocketError
_GAddress_Init_INET(GAddress
*address
);
103 GSocketError
_GAddress_Init_UNIX(GAddress
*address
);
109 #endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
111 #endif /* __GSOCK_MSW_H */