Tutorial 2 - Mistake and correction

Network Programming
Post Reply
Posts: 8
Joined: Fri Sep 27, 2013 1:51 pm

Tutorial 2 - Mistake and correction

Post by santos » Tue Nov 19, 2013 10:55 am

A colleague of yours emailed me saying:

"Disregard this if you already knew, but there is an error in Tutorial 2.
peer->Startup is not called in the client code before trying to connect
to the server, which causes an INVALID_PARAMETER error to be returned
from peer->Connect (Which seems like a weird error code for this to me)."

There is a mistake in the tutorial, it is missing an instruction to start the peer in the client config.

Code: Select all

// Start socket (define the number of incoming connection and the port)
peer->Startup(MAX_CLIENTS, &sd, 1);

// Connect to the server
peer->Connect(SERVER_ADDR, SERVER_PORT, 0,0);
I hope this helps, I will review the tutorial and place it online ASAP.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest