Struct mio_httpc::Httpc [] [src]

pub struct Httpc {}

Send requests, receive responses.

Methods

impl Httpc
[src]

[src]

Httpc will create connections with mio token in range [con_offset..con_offset+0xFFFF]

[src]

Number of currently open connections (in active and idle keep-alive state)

[src]

Reuse a response buffer for subsequent calls.

[src]

Prematurely finish call.

[src]

Call periodically to check for call timeouts and DNS retries. Returns list of calls that have timed out. You must execute call_close yourself and timeout will return them every time until you do. (every 100ms for example)

[src]

Same as timeout except that timed out calls get appended. This way you can reuse old allocations (if you truncated to 0).

[src]

Get CallRef for ev if token in configured range for Httpc. Compare CallRef external call.

First you must call call_send until you get a SendState::Receiving after that call is in receive state and you must call call_recv.

[src]

If request has body it will be either taken from buf, from Request provided to CallBuilder or will return SendState::WaitReqBody.

buf slice is assumed to have taken previous SendState::SentBody(usize) into account and starts from part of buffer that has not been sent yet.

[src]

If no buf provided, response body (if any) is stored in an internal buffer. If buf provided after some body has been received, it will be copied to it.

Buf will be expanded if required. Bytes are always appended. If you want to receive response entirely in buf, you should reserve capacity for entire body before calling call_recv.

If body is only stored in internal buffer it will be limited to CallBuilder::max_response.