Index: /pjproject/trunk/pjlib/include/pj/sock.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/sock.h	(revision 2945)
+++ /pjproject/trunk/pjlib/include/pj/sock.h	(revision 2946)
@@ -291,4 +291,11 @@
 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;
@@ -317,4 +324,10 @@
     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,4 +353,10 @@
     /** 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 */
Index: /pjproject/trunk/pjlib/src/pj/sock_bsd.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/sock_bsd.c	(revision 2945)
+++ /pjproject/trunk/pjlib/src/pj/sock_bsd.c	(revision 2946)
@@ -61,24 +61,35 @@
 #ifdef SOL_IP
 const pj_uint16_t PJ_SOL_IP	= SOL_IP;
+#elif defined(PJ_WIN32) && PJ_WIN32
+const pj_uint16_t PJ_SOL_IP	= IPPROTO_IP;
 #else
 const pj_uint16_t PJ_SOL_IP	= 0xFFFF;
 #endif /* SOL_IP */
+
 #if defined(SOL_TCP)
 const pj_uint16_t PJ_SOL_TCP	= SOL_TCP;
 #elif defined(IPPROTO_TCP)
 const pj_uint16_t PJ_SOL_TCP	= IPPROTO_TCP;
+#elif defined(PJ_WIN32) && PJ_WIN32
+const pj_uint16_t PJ_SOL_TCP	= IPPROTO_TCP;
 #else
 const pj_uint16_t PJ_SOL_TCP	= 0xFFFF;
 #endif /* SOL_TCP */
+
 #ifdef SOL_UDP
 const pj_uint16_t PJ_SOL_UDP	= SOL_UDP;
+#elif defined(PJ_WIN32) && PJ_WIN32
+const pj_uint16_t PJ_SOL_UDP	= IPPROTO_UDP;
 #else
 const pj_uint16_t PJ_SOL_UDP	= 0xFFFF;
-#endif
+#endif /* SOL_UDP */
+
 #ifdef SOL_IPV6
 const pj_uint16_t PJ_SOL_IPV6	= SOL_IPV6;
+#elif defined(PJ_WIN32) && PJ_WIN32
+const pj_uint16_t PJ_SOL_IPV6	= IPPROTO_IPV6;
 #else
 const pj_uint16_t PJ_SOL_IPV6	= 0xFFFF;
-#endif
+#endif /* SOL_IPV6 */
 
 /* IP_TOS */
@@ -117,4 +128,7 @@
 const pj_uint16_t PJ_SO_RCVBUF  = SO_RCVBUF;
 const pj_uint16_t PJ_SO_SNDBUF  = SO_SNDBUF;
+const pj_uint16_t PJ_TCP_NODELAY= TCP_NODELAY;
+const pj_uint16_t PJ_SO_REUSEADDR= SO_REUSEADDR;
+
 /* Multicasting is not supported e.g. in PocketPC 2003 SDK */
 #ifdef IP_MULTICAST_IF
Index: /pjproject/trunk/pjlib/src/pj/sock_common.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/sock_common.c	(revision 2945)
+++ /pjproject/trunk/pjlib/src/pj/sock_common.c	(revision 2946)
@@ -1063,4 +1063,14 @@
 }
 
+PJ_DEF(pj_uint16_t) pj_TCP_NODELAY(void)
+{
+    return PJ_TCP_NODELAY;
+}
+
+PJ_DEF(pj_uint16_t) pj_SO_REUSEADDR(void)
+{
+    return PJ_SO_REUSEADDR;
+}
+
 PJ_DEF(pj_uint16_t) pj_IP_MULTICAST_IF(void)
 {
Index: /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 2945)
+++ /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 2946)
@@ -48,5 +48,5 @@
 const pj_uint16_t PJ_SOCK_RDM	= 0xFFFF;
 
-/* setsockop() is not really supported. */
+/* we don't support setsockopt(), these are just dummy values */
 const pj_uint16_t PJ_SOL_SOCKET	= 0xFFFF;
 const pj_uint16_t PJ_SOL_IP	= 0xFFFF;
@@ -61,4 +61,8 @@
 const pj_uint16_t PJ_IPTOS_RELIABILITY	= 0;
 const pj_uint16_t PJ_IPTOS_MINCOST	= 0;
+
+/* Misc */
+const pj_uint16_t PJ_TCP_NODELAY = 0xFFFF;
+const pj_uint16_t PJ_SO_REUSEADDR = 0xFFFF;
 
 /* ioctl() is also not supported. */
Index: /pjproject/trunk/pjlib/src/pjlib-test/sock.c
===================================================================
--- /pjproject/trunk/pjlib/src/pjlib-test/sock.c	(revision 2945)
+++ /pjproject/trunk/pjlib/src/pjlib-test/sock.c	(revision 2946)
@@ -168,4 +168,20 @@
     /* pj_gethostaddr() */
 
+    /* Various constants */
+#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0
+    if (PJ_SOL_IP==0xFFFF) return -5500;
+    if (PJ_SOL_TCP==0xFFFF) return -5510;
+    if (PJ_SOL_UDP==0xFFFF) return -5520;
+    if (PJ_SOL_IPV6==0xFFFF) return -5530;
+
+    if (PJ_SO_TYPE==0xFFFF) return -5540;
+    if (PJ_SO_RCVBUF==0xFFFF) return -5550;
+    if (PJ_SO_SNDBUF==0xFFFF) return -5560;
+    if (PJ_TCP_NODELAY==0xFFFF) return -5570;
+    if (PJ_SO_REUSEADDR==0xFFFF) return -5580;
+
+    if (PJ_MSG_OOB==0xFFFF) return -5590;
+    if (PJ_MSG_PEEK==0xFFFF) return -5600;
+#endif
 
     return 0;
