Introduced srv_conn struct. Modified the API accordingly.