#ifndef _MODULE_IO_Socket_
#define _MODULE_IO_Socket_

#include <__typemap.h>
#include <RT0.oh>
#include <IO.oh>
#include <IO/Address.oh>
#include <IO/StdChannels.oh>
#include <RT0.oh>
#include <Object.oh>
#include <Exception.oh>
typedef struct IO_Socket__SocketDesc *IO_Socket__Socket;
typedef struct IO_Socket__SocketDesc {
  OOC_INT32 fd;
} IO_Socket__SocketDesc;
typedef struct IO_Socket__ServerDesc *IO_Socket__Server;
typedef struct IO_Socket__ServerDesc {
  OOC_INT32 fd;
} IO_Socket__ServerDesc;
extern IO_Socket__Socket IO_Socket__New(void);
extern void IO_Socket__SocketDesc_SetBlocking(IO_Socket__Socket s, OOC_CHAR8 block);
#define _TBN_IO_Socket__SocketDesc_SetBlocking 5
typedef void (*_TBP_IO_Socket__SocketDesc_SetBlocking)(IO_Socket__Socket s, OOC_CHAR8 block);
extern void IO_Socket__SocketDesc_Bind(IO_Socket__Socket s, IO_Address__Socket bindPoint);
#define _TBN_IO_Socket__SocketDesc_Bind 0
typedef void (*_TBP_IO_Socket__SocketDesc_Bind)(IO_Socket__Socket s, IO_Address__Socket bindPoint);
extern OOC_CHAR8 IO_Socket__SocketDesc_Connect(IO_Socket__Socket s, IO_Address__Socket endPoint);
#define _TBN_IO_Socket__SocketDesc_Connect 2
typedef OOC_CHAR8 (*_TBP_IO_Socket__SocketDesc_Connect)(IO_Socket__Socket s, IO_Address__Socket endPoint);
extern OOC_CHAR8 IO_Socket__SocketDesc_FinishConnect(IO_Socket__Socket s);
#define _TBN_IO_Socket__SocketDesc_FinishConnect 3
typedef OOC_CHAR8 (*_TBP_IO_Socket__SocketDesc_FinishConnect)(IO_Socket__Socket s);
extern IO_Address__Socket IO_Socket__SocketDesc_RemoteAddress(IO_Socket__Socket s);
#define _TBN_IO_Socket__SocketDesc_RemoteAddress 4
typedef IO_Address__Socket (*_TBP_IO_Socket__SocketDesc_RemoteAddress)(IO_Socket__Socket s);
extern void IO_Socket__SocketDesc_Close(IO_Socket__Socket s);
#define _TBN_IO_Socket__SocketDesc_Close 1
typedef void (*_TBP_IO_Socket__SocketDesc_Close)(IO_Socket__Socket s);
extern IO_Socket__Server IO_Socket__NewServer(void);
extern void IO_Socket__ServerDesc_SetReuseAddress(IO_Socket__Server s, OOC_CHAR8 on);
#define _TBN_IO_Socket__ServerDesc_SetReuseAddress 4
typedef void (*_TBP_IO_Socket__ServerDesc_SetReuseAddress)(IO_Socket__Server s, OOC_CHAR8 on);
extern void IO_Socket__ServerDesc_SetBlocking(IO_Socket__Server s, OOC_CHAR8 block);
#define _TBN_IO_Socket__ServerDesc_SetBlocking 3
typedef void (*_TBP_IO_Socket__ServerDesc_SetBlocking)(IO_Socket__Server s, OOC_CHAR8 block);
extern void IO_Socket__ServerDesc_Bind(IO_Socket__Server s, IO_Address__Socket bindPoint, OOC_INT32 queueSize);
#define _TBN_IO_Socket__ServerDesc_Bind 1
typedef void (*_TBP_IO_Socket__ServerDesc_Bind)(IO_Socket__Server s, IO_Address__Socket bindPoint, OOC_INT32 queueSize);
extern IO_Socket__Socket IO_Socket__ServerDesc_Accept(IO_Socket__Server s);
#define _TBN_IO_Socket__ServerDesc_Accept 0
typedef IO_Socket__Socket (*_TBP_IO_Socket__ServerDesc_Accept)(IO_Socket__Server s);
extern void IO_Socket__ServerDesc_Close(IO_Socket__Server s);
#define _TBN_IO_Socket__ServerDesc_Close 2
typedef void (*_TBP_IO_Socket__ServerDesc_Close)(IO_Socket__Server s);
extern OOC_INT32 IO_Socket__Read(IO_Socket__Socket s, OOC_CHAR8 buffer[], OOC_LEN buffer_0d, OOC_INT32 start, OOC_INT32 length);
extern OOC_INT32 IO_Socket__Write(IO_Socket__Socket s, const OOC_CHAR8 buffer[], OOC_LEN buffer_0d, OOC_INT32 start, OOC_INT32 length);
extern void OOC_IO_Socket_init(void);
extern void OOC_IO_Socket_init0(void);

/* run-time meta data */
extern RT0__StructDesc _td_IO_Socket__Socket;
extern RT0__StructDesc _td_IO_Socket__SocketDesc;
extern RT0__StructDesc _td_IO_Socket__Server;
extern RT0__StructDesc _td_IO_Socket__ServerDesc;
extern RT0__StructDesc _td_IO_Socket__4081;
extern RT0__StructDesc _td_IO_Socket__4278;
#endif /* _MODULE_IO_Socket_ */

/* --- */
