diff options
author | Benny Prijono <bennylp@teluu.com> | 2014-04-15 08:46:18 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2014-04-15 08:46:18 +0000 |
commit | 77503f8a6dfc9a1b9f0fe0b028c6bb3fd575693a (patch) | |
tree | 0aae3a7603a01c2572ac366b3904f21e2d0c384b /pjsip/include | |
parent | d92ae21ccb7898aceeec8f5e01925ebea6a2e903 (diff) |
Closed #1760: added pjsip_tcp_transport_get_socket() API to get the raw socket handle from SIP TCP transport
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4817 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_transport_tcp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_transport_tcp.h b/pjsip/include/pjsip/sip_transport_tcp.h index 7e7bc139..28169fcc 100644 --- a/pjsip/include/pjsip/sip_transport_tcp.h +++ b/pjsip/include/pjsip/sip_transport_tcp.h @@ -204,6 +204,18 @@ PJ_DECL(pj_status_t) pjsip_tcp_transport_start3( pjsip_tpfactory **p_factory ); +/** + * Retrieve the internal socket handle used by the TCP transport. Note + * that this socket normally is registered to ioqueue, so application + * needs to take care not to perform operation that disrupts ioqueue + * operation. + * + * @param transport The TCP transport. + * + * @return The socket handle, or PJ_INVALID_SOCKET if no socket + * is currently being used. + */ +PJ_DECL(pj_sock_t) pjsip_tcp_transport_get_socket(pjsip_transport *transport); PJ_END_DECL |