• Advertisement
Sign in to follow this  

Client error

This topic is 2394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello.Immediately after my client's connection code to the server, I get repeated NetExceptions. Here's the connection code:



config = new NetPeerConfiguration("NetGame");
client = new NetClient(config);
client.Start();
// Registration message
NetOutgoingMessage registration = new NetOutgoingMessage();
registration.Write(username);
registration.Write(Game.version);
// Connect with the registration message
client.Connect(host, 3579, registration);
Console.WriteLine("[client] Connected to " + host + ", registering...");


After some debugging, I've discovered that the NetException is thrown because the NetConnectionStatus is RespondedConnect. Unfortunately I've got no idea what this means or how to fix it. The only idea I have is that it's just a failed connection, but I'm not sure. Any suggestions?
Thanks.

Share this post


Link to post
Share on other sites
Advertisement

Hello.Immediately after my client's connection code to the server, I get repeated NetExceptions. Here's the connection code:



config = new NetPeerConfiguration("NetGame");
client = new NetClient(config);
client.Start();
// Registration message
NetOutgoingMessage registration = new NetOutgoingMessage();
registration.Write(username);
registration.Write(Game.version);
// Connect with the registration message
client.Connect(host, 3579, registration);
Console.WriteLine("[client] Connected to " + host + ", registering...");


After some debugging, I've discovered that the NetException is thrown because the NetConnectionStatus is RespondedConnect. Unfortunately I've got no idea what this means or how to fix it. The only idea I have is that it's just a failed connection, but I'm not sure. Any suggestions?
Thanks.



I think you have to create messages like this.... client.CreateMessage();

maybe that will solve the problem. Not sure though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement