Changeset 2946
- Timestamp:
- Oct 15, 2009 3:48:20 AM (15 years ago)
- Location:
- pjproject/trunk/pjlib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/sock.h
r2863 r2946 291 291 extern const pj_uint16_t PJ_SO_SNDBUF; 292 292 293 /** Disables the Nagle algorithm for send coalescing. @see pj_TCP_NODELAY */ 294 extern const pj_uint16_t PJ_TCP_NODELAY; 295 296 /** Allows the socket to be bound to an address that is already in use. 297 * @see pj_SO_REUSEADDR */ 298 extern const pj_uint16_t PJ_SO_REUSEADDR; 299 293 300 /** IP multicast interface. @see pj_IP_MULTICAST_IF() */ 294 301 extern const pj_uint16_t PJ_IP_MULTICAST_IF; … … 317 324 PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void); 318 325 326 /** Get #PJ_TCP_NODELAY constant */ 327 PJ_DECL(pj_uint16_t) pj_TCP_NODELAY(void); 328 329 /** Get #PJ_SO_REUSEADDR constant */ 330 PJ_DECL(pj_uint16_t) pj_SO_REUSEADDR(void); 331 319 332 /** Get #PJ_IP_MULTICAST_IF constant */ 320 333 PJ_DECL(pj_uint16_t) pj_IP_MULTICAST_IF(void); … … 340 353 /** Get #PJ_SO_SNDBUF constant */ 341 354 # define pj_SO_SNDBUF() PJ_SO_SNDBUF 355 356 /** Get #PJ_TCP_NODELAY constant */ 357 # define pj_TCP_NODELAY() PJ_TCP_NODELAY 358 359 /** Get #PJ_SO_REUSEADDR constant */ 360 # define pj_SO_REUSEADDR() PJ_SO_REUSEADDR 342 361 343 362 /** Get #PJ_IP_MULTICAST_IF constant */ -
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r2394 r2946 61 61 #ifdef SOL_IP 62 62 const pj_uint16_t PJ_SOL_IP = SOL_IP; 63 #elif defined(PJ_WIN32) && PJ_WIN32 64 const pj_uint16_t PJ_SOL_IP = IPPROTO_IP; 63 65 #else 64 66 const pj_uint16_t PJ_SOL_IP = 0xFFFF; 65 67 #endif /* SOL_IP */ 68 66 69 #if defined(SOL_TCP) 67 70 const pj_uint16_t PJ_SOL_TCP = SOL_TCP; 68 71 #elif defined(IPPROTO_TCP) 69 72 const pj_uint16_t PJ_SOL_TCP = IPPROTO_TCP; 73 #elif defined(PJ_WIN32) && PJ_WIN32 74 const pj_uint16_t PJ_SOL_TCP = IPPROTO_TCP; 70 75 #else 71 76 const pj_uint16_t PJ_SOL_TCP = 0xFFFF; 72 77 #endif /* SOL_TCP */ 78 73 79 #ifdef SOL_UDP 74 80 const pj_uint16_t PJ_SOL_UDP = SOL_UDP; 81 #elif defined(PJ_WIN32) && PJ_WIN32 82 const pj_uint16_t PJ_SOL_UDP = IPPROTO_UDP; 75 83 #else 76 84 const pj_uint16_t PJ_SOL_UDP = 0xFFFF; 77 #endif 85 #endif /* SOL_UDP */ 86 78 87 #ifdef SOL_IPV6 79 88 const pj_uint16_t PJ_SOL_IPV6 = SOL_IPV6; 89 #elif defined(PJ_WIN32) && PJ_WIN32 90 const pj_uint16_t PJ_SOL_IPV6 = IPPROTO_IPV6; 80 91 #else 81 92 const pj_uint16_t PJ_SOL_IPV6 = 0xFFFF; 82 #endif 93 #endif /* SOL_IPV6 */ 83 94 84 95 /* IP_TOS */ … … 117 128 const pj_uint16_t PJ_SO_RCVBUF = SO_RCVBUF; 118 129 const pj_uint16_t PJ_SO_SNDBUF = SO_SNDBUF; 130 const pj_uint16_t PJ_TCP_NODELAY= TCP_NODELAY; 131 const pj_uint16_t PJ_SO_REUSEADDR= SO_REUSEADDR; 132 119 133 /* Multicasting is not supported e.g. in PocketPC 2003 SDK */ 120 134 #ifdef IP_MULTICAST_IF -
pjproject/trunk/pjlib/src/pj/sock_common.c
r2886 r2946 1063 1063 } 1064 1064 1065 PJ_DEF(pj_uint16_t) pj_TCP_NODELAY(void) 1066 { 1067 return PJ_TCP_NODELAY; 1068 } 1069 1070 PJ_DEF(pj_uint16_t) pj_SO_REUSEADDR(void) 1071 { 1072 return PJ_SO_REUSEADDR; 1073 } 1074 1065 1075 PJ_DEF(pj_uint16_t) pj_IP_MULTICAST_IF(void) 1066 1076 { -
pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
r2771 r2946 48 48 const pj_uint16_t PJ_SOCK_RDM = 0xFFFF; 49 49 50 /* setsockop() is not really supported.*/50 /* we don't support setsockopt(), these are just dummy values */ 51 51 const pj_uint16_t PJ_SOL_SOCKET = 0xFFFF; 52 52 const pj_uint16_t PJ_SOL_IP = 0xFFFF; … … 61 61 const pj_uint16_t PJ_IPTOS_RELIABILITY = 0; 62 62 const pj_uint16_t PJ_IPTOS_MINCOST = 0; 63 64 /* Misc */ 65 const pj_uint16_t PJ_TCP_NODELAY = 0xFFFF; 66 const pj_uint16_t PJ_SO_REUSEADDR = 0xFFFF; 63 67 64 68 /* ioctl() is also not supported. */ -
pjproject/trunk/pjlib/src/pjlib-test/sock.c
r2863 r2946 168 168 /* pj_gethostaddr() */ 169 169 170 /* Various constants */ 171 #if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0 172 if (PJ_SOL_IP==0xFFFF) return -5500; 173 if (PJ_SOL_TCP==0xFFFF) return -5510; 174 if (PJ_SOL_UDP==0xFFFF) return -5520; 175 if (PJ_SOL_IPV6==0xFFFF) return -5530; 176 177 if (PJ_SO_TYPE==0xFFFF) return -5540; 178 if (PJ_SO_RCVBUF==0xFFFF) return -5550; 179 if (PJ_SO_SNDBUF==0xFFFF) return -5560; 180 if (PJ_TCP_NODELAY==0xFFFF) return -5570; 181 if (PJ_SO_REUSEADDR==0xFFFF) return -5580; 182 183 if (PJ_MSG_OOB==0xFFFF) return -5590; 184 if (PJ_MSG_PEEK==0xFFFF) return -5600; 185 #endif 170 186 171 187 return 0;
Note: See TracChangeset
for help on using the changeset viewer.