Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kTcpServer.h
Go to the documentation of this file.
1 
10 #ifndef K_API_TCP_SERVER_H
11 #define K_API_TCP_SERVER_H
12 
13 #include <kApi/Io/kNetwork.h>
14 #include <kApi/Io/kTcpServer.x.h>
15 
22 //typedef kObject kTcpServer; --forward-declared in kApiDef.x.h
23 
33 kFx(kStatus) kTcpServer_Construct(kTcpServer* server, kIpVersion ipVersion, kAlloc allocator);
34 
51 kFx(kStatus) kTcpServer_SetWriteBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize);
52 
66 kFx(kStatus) kTcpServer_SetReadBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize);
67 
83 
97 kFx(kStatus) kTcpServer_Listen(kTcpServer server, kIpAddress address, k32u port, kSize backlog);
98 
112 kFx(kStatus) kTcpServer_Accept(kTcpServer server, k64u timeout, kTcpClient* client, kAlloc allocator);
113 
121 kFx(kSocket) kTcpServer_Socket(kTcpServer server);
122 
131 kFx(kStatus) kTcpServer_LocalEndPoint(kTcpServer server, kIpEndPoint* endPoint);
132 
133 #endif
Represents a 32-bit unsigned integer.
kStatus kTcpServer_SetWriteBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of write buffers for accepted client sockets.
Represents a 64-bit unsigned integer.
Represents an Internet Protocol version.
kStatus kTcpServer_Listen(kTcpServer server, kIpAddress address, k32u port, kSize backlog)
Places the server into the listening state, to monitor for incoming connection requests.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
Represents an IP address.
Definition: kNetwork.h:37
Represents a signed integer that can store a pointer address.
kStatus kTcpServer_EnableReuseAddress(kTcpServer server, kBool reuse)
Enables or disables reuse of a local end point within a short period of time.
kStatus kTcpServer_SetReadBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of read buffers for accepted client sockets.
Represents a TCP server.
Represents a TCP client.
kStatus kTcpServer_Accept(kTcpServer server, k64u timeout, kTcpClient *client, kAlloc allocator)
Blocks until an incoming connection is established, or the specified timeout interval elapses...
kStatus kTcpServer_Construct(kTcpServer *server, kIpVersion ipVersion, kAlloc allocator)
Constructs a kTcpServer object.
kStatus kTcpServer_LocalEndPoint(kTcpServer server, kIpEndPoint *endPoint)
Returns the local end point for a listening server.
IP networking definitions.
Represents an error code.
Represents an IP end point (address, port).
Definition: kNetwork.h:199
kSocket kTcpServer_Socket(kTcpServer server)
Returns the underlying socket object.
Represents a network socket.
Represents a boolean value.