Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 21st, 2007, 8:48 PM   #1
cwl157
Professional Programmer
 
Join Date: Feb 2005
Posts: 323
Rep Power: 4 cwl157 is on a distinguished road
simple echo server

I want to make a simple echo server to get started on c++ sockets in windows. The problem is all of the examples i've found on google I haven't been able to get to work because i'm always missing a library or their using something different from me or something to where it wont compile. I use devcpp and any help with getting started on sockets and making a simple echo server would be appreciated. Thanks.
cwl157 is offline   Reply With Quote
Old Jun 21st, 2007, 9:29 PM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 414
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
You should include winsock2.h and add libwsock32.a which you can find in Dev-Cpp/lib/. You can add it to the project from Project Options Parameters Add Library
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Jun 22nd, 2007, 8:58 AM   #3
cwl157
Professional Programmer
 
Join Date: Feb 2005
Posts: 323
Rep Power: 4 cwl157 is on a distinguished road
ok so i have done that but now what do i do. I know there is a type called SOCKET is reading and writing the same as reading and writing to the screen but instead of cout and cin its something else? How do i read and write to the socket and connect to it. I did a little server in java where you started it and then to connect went to the ip of the machine and then entered a specific port thats specified in the server code. Does it work kind of the same way?
cwl157 is offline   Reply With Quote
Old Jun 22nd, 2007, 9:26 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Read Beej. It's *nix oriented but the basic concepts are the same, and it's easy to adapt to Winsock.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple question, I think? Phonetic Bash / Shell Scripting 3 Nov 15th, 2006 3:31 AM
remove(); badbasser98 C++ 16 Nov 10th, 2005 2:24 PM
java echo server cwl157 Java 3 May 20th, 2005 12:10 PM
TCP Header for Echo Communication AusTex C++ 0 Feb 27th, 2005 3:57 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:11 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC