Thread: Echoserver????
View Single Post
  #3 (permalink)  
Old 07-09-2008, 07:18 AM
MeTh0Dz MeTh0Dz is offline
SLICE OWNZ YOUR SOUL
 
Join Date: May 2008
Posts: 294
Last Blog:
Ternary Operator CPP
Rep Power: 0
MeTh0Dz has a spectacular aura aboutMeTh0Dz has a spectacular aura aboutMeTh0Dz has a spectacular aura about
Default Re: Echoserver????

For a chat server you don't have to use asynchronous sockets, you can just use threads. In the server program just use CreateThread() for every connection that it accepts. Why do you need to use macros? You can also making a receiving thread in the client software and just use send() as the primary part of your program. bool when used as a function type will return true or false. They are just returning -1 for the purpose of error checking, so they can see where their code is ******* up. It doesn't really matter what you return as long as it is the type of your function. They could return 5382 and it would stuff function properly.

Last edited by xXHalfSliceXx; 07-14-2008 at 10:09 PM.
Reply With Quote