I have my server code and client code pretty much the same but they won’t connect at all and i can’t work out why. Its really getting annoying.
This is my connection on the server scene:
void Awake()
{
NetworkTransport.Init();
ConnectionConfig config = new ConnectionConfig();
Channel_Reliable = config.AddChannel(QosType.Reliable);
Channel_Unreliable = config.AddChannel(QosType.Unreliable);
HostTopology topology = new HostTopology(config, 100);
HostID = NetworkTransport.AddHost(topology,8888,null);
isStarted = true;
}
My client scene has:
public void Connect()
{
NetworkTransport.Init();
ConnectionConfig config = new ConnectionConfig();
// why does client need to specific 100
// connections if it only communicates to server?
HostTopology topology = new HostTopology(config, 100);
// Create a host based on the topology we just created, and bind the socket to port 9999.
SocketID = NetworkTransport.AddHost(topology, 9999);
Channel_Reliable = config.AddChannel(QosType.Reliable);
Channel_Unreliable = config.AddChannel(QosType.Unreliable);
// Connect to the host (aka server scene) with IP 127.0.0.1 and port 8888
ConnectionID = NetworkTransport.Connect(SocketID, "127.0.0.1", 8888, 0, out error);
}
I never receive a connect event from the server or the client side so i can’t ever validate the connection between the two.
My console log however gives me :
Log: Channel configuration mismatch
This seems to be coming from the client build - but i don’t know what it means or how to resolve it. I can’t see where i have gone wrong here. Please help.