Olivine-Labs / Alchemy-Websockets

An extremely efficient C# WebSocket server.
http://AlchemyWebsockets.net
Other
309 stars 105 forks source link

Can't start two ServerSockets with different ports #98

Open Kronos87 opened 10 years ago

Kronos87 commented 10 years ago

Hello, I try to start to ServerSockets with two different ports like this:

        ws = new WebSocketServer(12345, IPAddress.Any)
        {
            OnConnected = OnConnected,
            OnDisconnect = OnDisconnect,
            TimeOut = new TimeSpan(0, 0, 5)
        };

        ws2 = new WebSocketServer(12346, IPAddress.Any)
        {
            OnConnected = OnConnected2,
            OnDisconnect = OnDisconnect2,
            TimeOut = new TimeSpan(0, 0, 5)
        };

And I get the error : "Each socket address (protocol, network address or port) may be used only once."

What can I do for this problem?

TimofeyBiryukov commented 7 years ago

+1