Quote:
else { // client connected successfully // start a thread that will communicate with client startThread (client[number_of_clients]); number_of_clients++; } }
Winsock2 for Games tutorial has 'startThread', but i can't find it
Hi im using the winsock2 for games tutorial hosted on gamedev. http://www.gamedev.net/reference/articles/article1059.asp It says to use 'startThread' but i cant find that function anywhere. Has the author accidently entered the wrong function name or what? heres where he says it:
Johnny,
startThread looks like a method call which will then call something like _beginthreadex() on the client passed in. I think the author has simply forgotten to include the method in his code and has left a bit of confusion.
The method looks like a simple call to begin the thread which handles the incoming and outgoing sockets for the client defined at client[ number_of_clients ] so I'd imagine is spawns a new thread which at the same time will set it's callback to wheatever method happens to handle the sending and receiving.
Try looking up _beginthread or _beginthreadex in the MSDN which is a macro used to inevitably call CreateThread() but forces the C runtime to be initialized.
Permafried-
startThread looks like a method call which will then call something like _beginthreadex() on the client passed in. I think the author has simply forgotten to include the method in his code and has left a bit of confusion.
The method looks like a simple call to begin the thread which handles the incoming and outgoing sockets for the client defined at client[ number_of_clients ] so I'd imagine is spawns a new thread which at the same time will set it's callback to wheatever method happens to handle the sending and receiving.
Try looking up _beginthread or _beginthreadex in the MSDN which is a macro used to inevitably call CreateThread() but forces the C runtime to be initialized.
Permafried-
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement