Port issue running more than one client build on local machine, used to work before!

Hi

Not sure why this is happening but i can’t seem to run a second client build on my local machine to connect to my server scene anymore. I get port issues.

The error is:

Socket: bind failed, error: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Cannot open socket on ip {*} and port {9999}; check please your network, most probably port has been already occupied

I used to be able to run multiple clients connecting to my server build on my local machine - not sure what i changed to suddenly stop this.

This is my client setup for connecting:

NetworkTransport.Init();
ConnectionConfig = new ConnectionConfig();
Channel_Reliable = ConnectionConfig.AddChannel(QosType.Reliable);
Channel_Unreliable = ConnectionConfig.AddChannel(QosType.Unreliable);
       
Topology = new HostTopology(ConnectionConfig, Connection_Max);

SocketID = NetworkTransport.AddHost(Topology, Port_Local);
NetworkTransport.Connect(SocketID, "127.0.0.1", Port_Server, 0, out error);

What have i done wrong here? I can’t work out why it suddenly won’ allow me to run multiple client builds anymore.

Hey, I’m not sure what is causing the problem for you. But I will say: I’ve seen this before.

& my band-aid was to have a debug menu that let me specify the port to use before it would connect. I believe it was just a button you could press that would increment the default port by 1 each time. very easy to set up if you’re stuck :smile: