![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 323
Rep Power: 4
![]() |
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.
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
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 |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 323
Rep Power: 4
![]() |
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?
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |