httpListen (Function)
Signature: httpListen(serverID: int, handler: (string, string, string, string) -> HttpResponse) -> int
Description: Starts the HTTP server with a request handler and returns 0 or a negative runtime error.
Parameters
- serverID (int): Server identifier from httpCreateServer
- handler ((string, string, string, string) -> HttpResponse): Request handler function
Returns: int
Example
let result = httpListen(serverId, requestHandler)
print("Server listening")
result = httpListen (serverId, requestHandler)
print "Server listening"