Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-2008, 02:00 PM
bodhi2016 bodhi2016 is offline
Newbie
 
Join Date: Jan 2008
Posts: 29
Credits: 0
Rep Power: 3
bodhi2016 is on a distinguished road
Default Echoserver????

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"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-08-2008, 03:08 PM
Anirban Chakraborty's Avatar   
Anirban Chakraborty Anirban Chakraborty is offline
Learning Programmer
 
Join Date: Oct 2006
Location: India
Posts: 44
Credits: 20
Rep Power: 8
Anirban Chakraborty will become famous soon enough
Default Re: Echoserver????

There should be a do***entation for that.
I can tell you the basics of echoserver.
__________________
Anirban Chakraborty
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 06:18 AM
MeTh0Dz MeTh0Dz is offline
SLICE OWNZ YOUR SOUL
 
Join Date: May 2008
Posts: 294
Last Blog:
Ternary Operator CPP
Credits: 20
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 09:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 01:09 AM.

Contest Stats

Xav ........ 1322.18
MeTh0Dz|Reb0rn ........ 1053.7
morefood2001 ........ 879.43
John ........ 877.37
marwex89 ........ 869.98
WingedPanther ........ 830.24
Brandon W ........ 735.07
chili5 ........ 309.39
Steve.L ........ 239.84
dcs ........ 216.02

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 82%

Ads