diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-10-15 03:48:20 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-10-15 03:48:20 +0000 |
commit | 02dba30b6c6c5b420d25f629024736ebbca0755f (patch) | |
tree | 7ff3dc91b804d0fbf951972b174b58f5a0d269bb /pjlib/include | |
parent | 4533e1452749d9c4060d63971eabc7a6baeb9e1e (diff) |
Ticket #972: setsockopt compatibility problems on Windows (thanks Yann and John Ridges for the reports)
- set PJ_SOL_IP, PJ_SOL_TCP, and PJ_SOL_UDP to IPPROTO_IP, IPPROTO_TCP, and IPPROTO_UDP respectively on Windows
- also added PJ_TCP_NODELAY and PJ_SO_REUSEADDR
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2946 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include')
-rw-r--r-- | pjlib/include/pj/sock.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pjlib/include/pj/sock.h b/pjlib/include/pj/sock.h index ecc23691..a72b63e3 100644 --- a/pjlib/include/pj/sock.h +++ b/pjlib/include/pj/sock.h @@ -290,6 +290,13 @@ extern const pj_uint16_t PJ_SO_RCVBUF; /** Buffer size for send. @see pj_SO_SNDBUF() */ extern const pj_uint16_t PJ_SO_SNDBUF; +/** Disables the Nagle algorithm for send coalescing. @see pj_TCP_NODELAY */ +extern const pj_uint16_t PJ_TCP_NODELAY; + +/** Allows the socket to be bound to an address that is already in use. + * @see pj_SO_REUSEADDR */ +extern const pj_uint16_t PJ_SO_REUSEADDR; + /** IP multicast interface. @see pj_IP_MULTICAST_IF() */ extern const pj_uint16_t PJ_IP_MULTICAST_IF; @@ -316,6 +323,12 @@ extern const pj_uint16_t PJ_IP_DROP_MEMBERSHIP; /** Get #PJ_SO_SNDBUF constant */ PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void); + /** Get #PJ_TCP_NODELAY constant */ + PJ_DECL(pj_uint16_t) pj_TCP_NODELAY(void); + + /** Get #PJ_SO_REUSEADDR constant */ + PJ_DECL(pj_uint16_t) pj_SO_REUSEADDR(void); + /** Get #PJ_IP_MULTICAST_IF constant */ PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_IF(void); @@ -340,6 +353,12 @@ extern const pj_uint16_t PJ_IP_DROP_MEMBERSHIP; /** Get #PJ_SO_SNDBUF constant */ # define pj_SO_SNDBUF() PJ_SO_SNDBUF + /** Get #PJ_TCP_NODELAY constant */ +# define pj_TCP_NODELAY() PJ_TCP_NODELAY + + /** Get #PJ_SO_REUSEADDR constant */ +# define pj_SO_REUSEADDR() PJ_SO_REUSEADDR + /** Get #PJ_IP_MULTICAST_IF constant */ # define pj_IP_MULTICAST_IF() PJ_IP_MULTICAST_IF |