The OpenD Programming Language

ConnManager

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

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

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.

Meta