ConnManager

* Keep opened connections for HTTP. * It is actually cache over tuple(schema, host, port) -> connection * with limited number of items. * * Evict least used.

Constructors

this
this(int limit)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

CMKey
alias CMKey = Tuple!(string, string, ushort)
Undocumented in source.

Functions

clear
void clear()

clear cache (and close connections)

del
NetworkStream del(string schema, string host, ushort port)

Remove connection from cache (without close).

get
NetworkStream get(string schema, string host, ushort port)

Lookup connection.

put
NetworkStream put(string schema, string host, ushort port, NetworkStream stream)

put new stream in cache, evict old stream and return it. If nothing evicted return null. Returned(evicted) connection can be closed.

Properties

length
auto length [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

CMValue
struct CMValue
Undocumented in source.

Meta