Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kHttpServer.h
Go to the documentation of this file.
1
10 #ifndef K_API_HTTP_SERVER_H
11 #define K_API_HTTP_SERVER_H
12
13 #include <kApi/Io/kNetwork.h>
14 #include <kApi/Io/kHttpServer.x.h>
15
32 //typedef kObject kHttpServer; --forward-declared in kApiDef.x.h
33
42 kFx(kStatus) kHttpServer_Construct(kHttpServer* server, kAlloc allocator);
43
56 kFx(kStatus) kHttpServer_SetAddress(kHttpServer server, kIpAddress address);
57
70 kFx(kStatus) kHttpServer_SetPort(kHttpServer server, k32u port);
71
82 kFx(kStatus) kHttpServer_SetMaxConnections(kHttpServer server, kSize capacity);
83
94 kFx(kStatus) kHttpServer_SetBacklog(kHttpServer server, kSize backlog);
95
113 kFx(kStatus) kHttpServer_SetWriteBuffers(kHttpServer server, kSSize socketSize, kSSize clientSize);
114
132 kFx(kStatus) kHttpServer_SetReadBuffers(kHttpServer server, kSSize socketSize, kSSize clientSize);
133
150 kFx(kStatus) kHttpServer_SetHandler(kHttpServer server, kCallbackFx function, kPointer receiver);
151
159 kFx(kStatus) kHttpServer_Start(kHttpServer server);
160
171 kFx(kStatus) kHttpServer_Stop(kHttpServer server);
172
181 kFx(kStatus) kHttpServer_LocalEndPoint(kHttpServer server, kIpEndPoint* endPoint);
182
183 #endif
k32u
Represents a 32-bit unsigned integer.
kPointer
Represents a void pointer.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kHttpServer::kHttpServer_SetHandler
kStatus kHttpServer_SetHandler(kHttpServer server, kCallbackFx function, kPointer receiver)
Sets the callback that will be invoked to process remote requests.
kIpAddress
Represents an IP address.
Definition: kNetwork.h:37
kSSize
Represents a signed integer that can store a pointer address.
kHttpServer::kHttpServer_SetReadBuffers
kStatus kHttpServer_SetReadBuffers(kHttpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of connection read buffers.
kHttpServer::kHttpServer_SetBacklog
kStatus kHttpServer_SetBacklog(kHttpServer server, kSize backlog)
Sets the size of the backlog used by the listening socket.
kHttpServer::kHttpServer_LocalEndPoint
kStatus kHttpServer_LocalEndPoint(kHttpServer server, kIpEndPoint *endPoint)
Reports the local end-point for a running server.
kHttpServer
Implements a simple HTTP server.
kHttpServer::kHttpServer_SetPort
kStatus kHttpServer_SetPort(kHttpServer server, k32u port)
Sets the local port to which the server should bind.
kHttpServer::kHttpServer_SetAddress
kStatus kHttpServer_SetAddress(kHttpServer server, kIpAddress address)
Sets the local address to which the server should bind.
kCallbackFx
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1737
kHttpServer::kHttpServer_Start
kStatus kHttpServer_Start(kHttpServer server)
Starts the server.
kHttpServer::kHttpServer_Construct
kStatus kHttpServer_Construct(kHttpServer *server, kAlloc allocator)
Constructs a kHttpServer object.
kNetwork.h
IP networking definitions.
kStatus
Represents an error code.
kIpEndPoint
Represents an IP end point (address, port).
Definition: kNetwork.h:199
kHttpServer::kHttpServer_SetMaxConnections
kStatus kHttpServer_SetMaxConnections(kHttpServer server, kSize capacity)
Sets the maximum number of simultaneous connections supported by the server.
kHttpServer::kHttpServer_Stop
kStatus kHttpServer_Stop(kHttpServer server)
Stops the server.
kHttpServer::kHttpServer_SetWriteBuffers
kStatus kHttpServer_SetWriteBuffers(kHttpServer server, kSSize socketSize, kSSize clientSize)
Sets the size of connection write buffers.