![]() |
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.
|
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
|
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?
|
Read Beej. It's *nix oriented but the basic concepts are the same, and it's easy to adapt to Winsock.
|
| All times are GMT -5. The time now is 8:09 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC