Skip to main content

Module conn

Module conn 

Source
Expand description

Connection mode markers for Client.

A Client is parameterized by a connection mode, which is a compile time only marker: it selects the value of the FCGI_KEEP_CONN flag sent in the FCGI_BEGIN_REQUEST record, and it decides which request methods are available.

This crate never creates, closes or otherwise manages sockets; the stream is owned by the caller. The mode therefore only describes what the client tells the FastCGI server about connection reuse, and how the client type behaves afterwards:

  • ShortConn: the server is free to close the connection once the response is complete, so the client can be used for a single request and its request methods consume self.
  • KeepAlive: the server is asked to keep the connection open, so the client stays usable and its request methods take &mut self, sending requests one after another.

Enums§

KeepAlive
Keep alive connection mode.
ShortConn
Short connection mode.

Traits§

Mode
Marker trait implemented by the connection modes of Client.