Hmm...I get a errormessage saying connect() returns -1...
(Yes, thorugh error-checking)
What do this mean?
-1 arent on the MSDN-list of possible errors
Hmm...I get a errormessage saying connect() returns -1...
(Yes, thorugh error-checking)
What do this mean?
-1 arent on the MSDN-list of possible errors
http://livebad.com/nuka
Da-Nuka
MSDN says connect() returns SOCKET_ERROR if the function fails. SOCKET_ERROR is probably defined as -1. Call WSAGetLastError() to get the actual error code to get more information.
You will find that the errors in all caps, are sometimes a defined error number like
Code:#define ERROR -2 #define OTHERERROR -1
If any part of my post is incorrect, please correct me.
This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.
Yeah SOCKET_ERROR is defined as -1. So basically yeah you aren't connecting, use WSAGetLastError() to see whats up . Assuming you are using winsock of course.... oh I am repeating what bithub said... oh well.