handleClient

The main logical function that's called when a new client socket is accepted which receives the request, handles it, and then closes the socket and frees any allocated resources.

void
handleClient
(,
Socket socket
,
ref ubyte[] receiveBuffer
,
ref MsgParser!Msg requestParser
,
Logger logger = getLogger()
)

Parameters

server HttpServer

The server that accepted the client.

socket Socket

The client's socket.

receiveBuffer ubyte[]

A preallocated buffer for reading the client's request.

requestParser MsgParser!Msg

The HTTP request parser.

logger Logger

A logger to use for any logging messages.