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/src | |
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/src')
-rw-r--r-- | pjsip/src/pjsip/sip_transport_tcp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c index 7a9f093e..6a0eaffb 100644 --- a/pjsip/src/pjsip/sip_transport_tcp.c +++ b/pjsip/src/pjsip/sip_transport_tcp.c @@ -1478,5 +1478,14 @@ static void tcp_keep_alive_timer(pj_timer_heap_t *th, pj_timer_entry *e) } +PJ_DEF(pj_sock_t) pjsip_tcp_transport_get_socket(pjsip_transport *transport) +{ + struct tcp_transport *tcp = (struct tcp_transport*)transport; + + PJ_ASSERT_RETURN(transport, PJ_INVALID_SOCKET); + return tcp->sock; +} + + #endif /* PJ_HAS_TCP */ |