Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kHttpServer_SetHandler ( kHttpServer  server,
kCallbackFx  function,
kPointer  receiver 
)

Sets the callback that will be invoked to process remote requests.

The callback 'sender' argument will receive a kHttpServer instance, while the callback 'args' argument will receive a kHttpServerChannel instance. The callback receiver can use the kHttpServerChannel object to access kHttpServerRequest and kHttpServerResponse objects, which can be used to parse the incoming request and to generate a response.

This function can only be called while the server is stopped.

Parameters
serverServer object.
functionCallback function.
receiverCallback receiver.
Returns
Operation status.