Connection Pool

Connection pool

HPool

Connection pool handle

Connection pool handle


HConnection

Connection handle

Connection handle


dmConnectionPool::Result

result enumeration

Result enumeration.

MEMBERS

dmConnectionPool::RESULT_OK - 0

dmConnectionPool::RESULT_OUT_OF_RESOURCES - -1

dmConnectionPool::RESULT_SOCKET_ERROR - -2

dmConnectionPool::RESULT_HANDSHAKE_FAILED - -3

dmConnectionPool::RESULT_SHUT_DOWN - -4


dmConnectionPool::Params()

Creation parameters

Creation parameters

MEMBERS

m_MaxConnections - Max connection in pool

m_MaxKeepAlive - Default max-keep-alive time in seconds


dmConnectionPool::New(params, pool)

Create a new connection pool

Create a new connection pool

PARAMETERS

params -

pool - pool (out)

RETURN

dmConnectionPool::RESULT_OK - on success


dmConnectionPool::Delete(pool)

Delete connnection pool

Delete connnection pool

PARAMETERS

pool - pool

RETURN

dmConnectionPool::RESULT_OK - on success


dmConnectionPool::Dial(pool, host, port, ssl, timeout, connection, sock_res)

Connection to a host/port

Connection to a host/port

PARAMETERS

pool - pool

host - host

port - port

ssl - true for ssl connection

timeout - The timeout (micro seconds) for the connection and ssl handshake

connection - connection (out)

sock_res - socket-result code on failure

RETURN

dmConnectionPool::RESULT_OK - on success


dmConnectionPool::Dial(pool, host, port, ssl, timeout, cancelflag, connection, sock_res)

Connection to a host/port

Connection to a host/port

PARAMETERS

pool - pool

host - host

port - port

ssl - true for ssl connection

timeout - The timeout (micro seconds) for the connection and ssl handshake

cancelflag - If set and not null, will make the request early out

connection - connection (out)

sock_res - socket-result code on failure

RETURN

dmConnectionPool::RESULT_OK - on success


dmConnectionPool::Return(pool, connection)

Return connection to pool

Return connection to pool

PARAMETERS

pool - pool

connection -


dmConnectionPool::Close(pool, connection)

Close connection. Use this function whenever an er...

Close connection. Use this function whenever an error occur in eg http.

PARAMETERS

pool - pool

connection -


dmConnectionPool::GetSocket(pool, connection)

Get socket for connection

Get socket for connection

PARAMETERS

pool - pool

connection -

RETURN

- on success


dmConnectionPool::GetSSLSocket(pool, connection)

Get secure socket.

Get secure socket.

PARAMETERS

pool - pool

connection -

RETURN

- on success


dmConnectionPool::Shutdown(pool, how)

Shuts down all open sockets in the pool and block ...

Shuts down all open sockets in the pool and block new connection attempts. The function can be called repeatedly on the same pool until it returns no more connections in use.

PARAMETERS

pool - pool

how - shutdown type to pass to socket shutdown function

RETURN

current - number of connections in use