VirtualBox

Ignore:
Timestamp:
Sep 29, 2015 10:47:47 PM (9 years ago)
Author:
vboxsync
Message:

Runtime: Allow specifying the default destination address on the UDP client socket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/udp.cpp

    r57955 r57957  
    688688
    689689
    690 RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTSOCKET pSock)
     690RTR3DECL(int) RTUdpCreateClientSocket(const char *pszAddress, uint32_t uPort, PRTNETADDR pDefaultDstAddr, PRTSOCKET pSock)
    691691{
    692692    /*
     
    715715        if (RT_SUCCESS(rc))
    716716        {
    717             *pSock = Sock;
    718             return VINF_SUCCESS;
     717            if (pDefaultDstAddr)
     718                rc = rtSocketConnect(Sock, pDefaultDstAddr, 0);
     719            if (RT_SUCCESS(rc))
     720            {
     721                *pSock = Sock;
     722                return VINF_SUCCESS;
     723            }
    719724        }
    720725        RTSocketClose(Sock);
     
    722727    return rc;
    723728}
     729
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette