Zen API

- Home
- Topics
- Types
- Files

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
82 kFx(kStatus) kTcpServer_EnableReuseAddress(kTcpServer server, kBool reuse);
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
k32u
Represents a 32-bit unsigned integer.
kTcpServer::kTcpServer_SetWriteBuffers
kStatus kTcpServer_SetWriteBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of write buffers for accepted client sockets.
k64u
Represents a 64-bit unsigned integer.
kIpVersion
Represents an Internet Protocol version.
kTcpServer::kTcpServer_Listen
kStatus kTcpServer_Listen(kTcpServer server, kIpAddress address, k32u port, kSize backlog)
Places the server into the listening state, to monitor for incoming connection requests.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kIpAddress
Represents an IP address.
Definition: kNetwork.h:37
kSSize
Represents a signed integer that can store a pointer address.
kTcpServer::kTcpServer_EnableReuseAddress
kStatus kTcpServer_EnableReuseAddress(kTcpServer server, kBool reuse)
Enables or disables reuse of a local end point within a short period of time.
kTcpServer::kTcpServer_SetReadBuffers
kStatus kTcpServer_SetReadBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of read buffers for accepted client sockets.
kTcpServer
Represents a TCP server.
kTcpClient
Represents a TCP client.
kTcpServer::kTcpServer_Accept
kStatus kTcpServer_Accept(kTcpServer server, k64u timeout, kTcpClient *client, kAlloc allocator)
Blocks until an incoming connection is established, or the specified timeout interval elapses...
kTcpServer::kTcpServer_Construct
kStatus kTcpServer_Construct(kTcpServer *server, kIpVersion ipVersion, kAlloc allocator)
Constructs a kTcpServer object.
kTcpServer::kTcpServer_LocalEndPoint
kStatus kTcpServer_LocalEndPoint(kTcpServer server, kIpEndPoint *endPoint)
Returns the local end point for a listening server.
kNetwork.h
IP networking definitions.
kStatus
Represents an error code.
kIpEndPoint
Represents an IP end point (address, port).
Definition: kNetwork.h:199
kTcpServer::kTcpServer_Socket
kSocket kTcpServer_Socket(kTcpServer server)
Returns the underlying socket object.
kSocket
Represents a network socket.
kBool
Represents a boolean value.