Index: /trunk/include/iprt/udp.h
===================================================================
--- /trunk/include/iprt/udp.h	(revision 57956)
+++ /trunk/include/iprt/udp.h	(revision 57957)
@@ -154,9 +154,11 @@
  *
  * @returns iprt status code.
- * @param   pszAddress      The address to connect to.
- * @param   uPort           The port to connect to.
- * @param   pSock           Where to store the handle to the established connection.
+ * @param   pszAddress          The address to connect to.
+ * @param   uPort               The port to connect to.
+ * @param   pDefaultDstAddr     A default destination address for sending data
+ *                              through this socket, can be NULL.
+ * @param   pSock               Where to store the handle to the established connection.
  */
-RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTSOCKET pSock);
+RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTNETADDR pDefaultDstAddr, PRTSOCKET pSock);
 
 /** @} */
Index: /trunk/src/VBox/Runtime/r3/udp.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/udp.cpp	(revision 57956)
+++ /trunk/src/VBox/Runtime/r3/udp.cpp	(revision 57957)
@@ -688,5 +688,5 @@
 
 
-RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTSOCKET pSock)
+RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTNETADDR pDefaultDstAddr, PRTSOCKET pSock)
 {
     /*
@@ -715,6 +715,11 @@
         if (RT_SUCCESS(rc))
         {
-            *pSock = Sock;
-            return VINF_SUCCESS;
+            if (pDefaultDstAddr)
+                rc = rtSocketConnect(Sock, pDefaultDstAddr, 0);
+            if (RT_SUCCESS(rc))
+            {
+                *pSock = Sock;
+                return VINF_SUCCESS;
+            }
         }
         RTSocketClose(Sock);
@@ -722,2 +727,3 @@
     return rc;
 }
+
Index: /trunk/src/VBox/Runtime/testcase/tstRTUdp-1.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTUdp-1.cpp	(revision 57956)
+++ /trunk/src/VBox/Runtime/testcase/tstRTUdp-1.cpp	(revision 57957)
@@ -99,5 +99,5 @@
     int rc;
     RTSOCKET hSocket;
-    RTTESTI_CHECK_RC(rc = RTUdpCreateClientSocket(RT_TEST_UDP_CLIENT_ADDRESS, RT_TEST_UDP_CLIENT_PORT, &hSocket),
+    RTTESTI_CHECK_RC(rc = RTUdpCreateClientSocket(RT_TEST_UDP_CLIENT_ADDRESS, RT_TEST_UDP_CLIENT_PORT, &ServerAddress, &hSocket),
                      VINF_SUCCESS);
     if (RT_SUCCESS(rc))
@@ -107,5 +107,5 @@
             char szBuf[512];
             RT_ZERO(szBuf);
-            RTTESTI_CHECK_RC_BREAK(RTSocketWriteTo(hSocket, "dude!\n", sizeof("dude!\n") - 1, &ServerAddress), VINF_SUCCESS);
+            RTTESTI_CHECK_RC_BREAK(RTSocketWrite(hSocket, "dude!\n", sizeof("dude!\n") - 1), VINF_SUCCESS);
 
             RTTESTI_CHECK_RC_BREAK(RTSocketRead(hSocket, szBuf, sizeof("hello\n") - 1, NULL), VINF_SUCCESS);
@@ -113,5 +113,5 @@
             RTTESTI_CHECK_BREAK(strcmp(szBuf, "hello\n") == 0);
 
-            RTTESTI_CHECK_RC_BREAK(RTSocketWriteTo(hSocket, "byebye\n", sizeof("byebye\n") - 1, &ServerAddress), VINF_SUCCESS);
+            RTTESTI_CHECK_RC_BREAK(RTSocketWrite(hSocket, "byebye\n", sizeof("byebye\n") - 1), VINF_SUCCESS);
             RT_ZERO(szBuf);
             RTTESTI_CHECK_RC_BREAK(RTSocketRead(hSocket, szBuf, sizeof("buh bye\n") - 1, NULL), VINF_SUCCESS);
