Sign in to follow this  
p4tr1ck

Client error

Recommended Posts

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

[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...");
[/code]

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
Butabee    274
[quote name='_Patrick' timestamp='1312749827' post='4845892']
Hello.Immediately after my client's connection code to the server, I get repeated NetExceptions. Here's the connection code:

[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...");
[/code]

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.
[/quote]


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
p4tr1ck    100
It doesn't appear to work. I'm getting the same error. [img]http://public.gamedev.net/public/style_emoticons/default/sad.gif[/img]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this