Methodz i have finished the simple winsock programme in which the the client software displays hello .Now i would like to make a Echoclient or a chat software in console mode of course (I would like to know the basic first then i would impliment it in the WI32 Api ).So I would like a bit of guidance from you .I cant understand where should i start.Do You guys have any online tutorial.What Is asynchrous sockets and is it necessary for creating echo server or chat programme.I downloaded a code from the net about a simple chat programme in that tutorial it is using a function like reqwinsockver 2_0.I have used inline function ,I have hardly used Macro's ,Even in Macros often they substitute the" ." by " _" can anybody tell me why.
Another thing is that what is a bool() function ???Can send function be used in the client software to send a string to the server software??
And why should we return -1 after each and every WSACleanUp() call??If it is to end the main function then shouldn't we return 0.Because at the end of each programme we type "return 0"
Echoserver????
Started by bodhi2016, Jul 08 2008 11:00 AM
2 replies to this topic
#1
Posted 08 July 2008 - 11:00 AM
|
|
|
#2
Posted 08 July 2008 - 12:08 PM
There should be a documentation for that.
I can tell you the basics of echoserver.
I can tell you the basics of echoserver.
Size does matter for science and its laws changes accordingly.
[SIGPIC][/SIGPIC]
An C
[SIGPIC][/SIGPIC]
An C
#3
Posted 09 July 2008 - 03:18 AM
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.
Edited by xXHalfSliceXx, 14 July 2008 - 06:09 PM.


Sign In
Create Account


Back to top









