#include "wx/setup.h"
#include "wx/platform.h"
-#include "wx/dlimpexp.h" // for WXDLLIMPEXP_NET
+#include "wx/dlimpexp.h" /* for WXDLLIMPEXP_NET */
#endif
#ifdef wxUSE_GSOCKET_CPLUSPLUS
typedef class GSocketBSD GSocket;
-#endif //def wxUSE_GSOCKET_CPLUSPLUS
+#endif
#ifdef __cplusplus
extern "C" {
#ifndef wxUSE_GSOCKET_CPLUSPLUS
typedef struct _GSocket GSocket;
-#endif //ndef wxUSE_GSOCKET_CPLUSPLUS
+#endif
typedef struct _GAddress GAddress;
typedef enum {
GSOCK_INVPORT,
GSOCK_WOULDBLOCK,
GSOCK_TIMEDOUT,
- GSOCK_MEMERR
+ GSOCK_MEMERR,
+ GSOCK_OPTERR,
} GSocketError;
/* See below for an explanation on how events work.
*/
GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags);
+GSocketError GSocket_GetSockOpt(GSocket *socket, int level, int optname,
+ void *optval, int *optlen);
+
+GSocketError GSocket_SetSockOpt(GSocket *socket, int level, int optname,
+ const void *optval, int optlen);
+GSocketError GSocket_SetReuseAddr(GSocket *socket);
+
+void GSocket_Streamed(GSocket *socket);
+void GSocket_Unstreamed(GSocket *socket);
/* Attributes */
*/
void GSocket_SetTimeout(GSocket *socket, unsigned long millisec);
-#endif //ndef wxUSE_GSOCKET_CPLUSPLUS
+#endif /* ndef wxUSE_GSOCKET_CPLUSPLUS */
/* GSocket_GetError:
* Returns the last error occured for this socket. Note that successful
*/
void GSocket_UnsetCallback(GSocket *socket, GSocketEventFlags flags);
-#endif //ndef wxUSE_GSOCKET_CPLUSPLUS
+#endif /* ndef wxUSE_GSOCKET_CPLUSPLUS */
/* GAddress */
#ifdef wxUSE_GSOCKET_CPLUSPLUS
#include "wx/unix/gsockunx.h"
-#endif // def wxUSE_GSOCKET_CPLUSPLUS
+#endif
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */