looking for simple/basic client server application

Mar 7, 2013 at 11:40am
i have looked at loads of websites but i just can't find code for a simple client server application using a console application (visual studios).

I just want an application where:
server waits for connections
client connects to server
server accepts connection

i then want to build on this and have the client get the server's ip address but this part can't happen til i build the client server.

can someone please link some simple source code files or websites? the easier the better
Mar 7, 2013 at 12:00pm
Are you talking socket level?
Mar 7, 2013 at 12:06pm
sorry i'm new at this. what do you mean?
Mar 7, 2013 at 12:16pm
Socket programming is lower level network programming. That is, it doesn't use any higher level libraries, such as boost or SFML/Network. Sockets are what allow two machines to communicate.

In a Windows implementation, you'd rely on the WinSock library. For *nix, it'd be socket.h.

If you're looking at this level, the below website is a good resource. It's a lot to read through and can be a little difficult to follow at times, but if you persevere, you should get it.

Most socket tutorials you'll find are a little messy. That's usually because socket programming is fairly messy in itself. A lot of people will recommend using a higher level library to avoid to woes of socket programming. Personally, I think it's worth a go as it'll give you a better insight as to how communication works.

Here's the site: http://cs.baylor.edu/~donahoo/practical/CSockets/

Last edited on Mar 7, 2013 at 12:17pm
Mar 7, 2013 at 12:23pm
i don't really care if its sockets or using high level libraries, i just a simple client server program thats easy to understand and just does the basic things ie the things i mentioned in the first post
Mar 7, 2013 at 12:29pm
Take a look at SFML networking or boost then. Plenty of code and tutorials on both.

http://www.sfml-dev.org/tutorials/1.6/
http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/tutorial.html
Mar 7, 2013 at 12:36pm
i already looked at these tutorials and they didn't help
Topic archived. No new replies allowed.