Jump to content
  • Advertisement
Sign in to follow this  
p4tr1ck

Client error

This topic is 2540 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!