Crate gdhttp

Source
Expand description

GDHttp is as low-level as you can do HTTP server for rust lang.

Structs§

HttpRequest
Struct representing HTTP Protocol request
HttpResponse
Struct representing HTTP Protocol response

Enums§

HttpMethod
Enum representing HTTP Protocol methods

Functions§

start
Start listening for connections synchronously. First argument is an address with port (ex. 0.0.0.0:8080). Second one is callback function that will be called when request from client has been received. You can then process it and return your response
start_multithreaded
Start listening for connections with multithreading enabled. First argument is an address with port (ex. 0.0.0.0:8080). Second one is callback function that will be called when request from client has been received. You can then process it and return your response. In this variant, callback is dispatched with usage of thread::spawn, which can change app performance in some cases.