Struct fastcgi_sdk::Exchange
[−]
[src]
pub struct Exchange { /* fields omitted */ }
An HTTP message exchange. This is a pair of a request and a response.
Methods
impl Exchange
[src]
pub unsafe fn new(request: *mut FCGX_Request) -> Self
[src]
Create an exchange from a FastCGI request. The exchange will take
ownership of the request, and free it with free
.
You probably want to use accept
instead.
pub fn accept<L>(listener: &L) -> Result<Self> where
L: AsRawFd,
[src]
L: AsRawFd,
Accept a request from a listener. This can be a TCP listener or a Unix domain socket listener. Do not pass an already-accepted socket; that will not work.
The reason this method exists, rather than requiring the caller to accept the connection from the listener, is that the C library of the FastCGI SDK does not expose a function that does not itself accept the connection.
ⓘImportant traits for Environment<'a>pub fn environment(&self) -> Environment
[src]
Return the FastCGI environment. These include the request method and the request header, and various information about the server.
ⓘImportant traits for RequestBody<'a>pub fn request_body(&self) -> RequestBody
[src]
Return the request body for this exchange. You can call this method multiple times, and all returned writers will write to the same buffer and socket.
ⓘImportant traits for Response<'a>pub fn response(&self) -> Response
[src]
Return the response for this exchange. You can call this method multiple times, and all returned readers will read from the same buffer and socket.
Trait Implementations
impl Debug for Exchange
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more