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
15 kBeginHeader()
16
17
23 //typedef kObject kTcpServer; --forward-declared in kApiDef.x.h
24
25
34 kFx(kStatus) kTcpServer_Construct(kTcpServer* server, kIpVersion ipVersion, kAlloc allocator);
35
52 kFx(kStatus) kTcpServer_SetWriteBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize);
53
67 kFx(kStatus) kTcpServer_SetReadBuffers(kTcpServer server, kSSize socketSize, kSSize clientSize);
68
83 kFx(kStatus) kTcpServer_EnableReuseAddress(kTcpServer server, kBool reuse);
84
98 kFx(kStatus) kTcpServer_Listen(kTcpServer server, kIpAddress address, k32u port, kSize backlog);
99
113 kFx(kStatus) kTcpServer_Accept(kTcpServer server, k64u timeout, kTcpClient* client, kAlloc allocator);
114
122 kFx(kSocket) kTcpServer_Socket(kTcpServer server);
123
132 kFx(kStatus) kTcpServer_LocalEndPoint(kTcpServer server, kIpEndPoint* endPoint);
133
134 kEndHeader()
135
136 #include <kApi/Io/kTcpServer.x.h>
137
138 #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:38
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:170
kTcpServer::kTcpServer_Socket
kSocket kTcpServer_Socket(kTcpServer server)
Returns the underlying socket object.
kSocket
Represents a network socket.
kBool
Represents a boolean value.