none
UDP bind and connect problems RRS feed

  • Question

  • Hi to all,
    i'm in the need to bind and connect more than one UDP socket  to a server.
    I've defined on the server two UDP socket (i want to use every UDP socket in separate thread).

    for example

            Dim workSocketUDP1 As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)
            Dim workSocketUDP2 As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)
            workSocketUDP1.Bind(ServerlocalEndPointUTP)
            workSocketUDP2.Bind(ServerlocalEndPointUTP)
    

    Where the ServerlocalEndPointUTP is the EP of the server with its ipAddress and Port.
    The Issue is that when i try to bind the workSocketUDP2 the server give me this error:

    Normally only allowed one usage of each socket address (protocol / network address / port)

    Is there a solution to have more than one UDP sockets connected in a separated thread on the server ?

    Many thanks.

    Wednesday, June 24, 2015 8:26 PM

All replies