Page 1 of 1

Tutorial 2 - Mistake and correction

Posted: Tue Nov 19, 2013 10:55 am
by santos
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.