Sign in to follow this  

Help on making the simplest sample

This topic is 4165 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Howdy there my friends, I'm quite new on this ciber-grounds, but it's been a while since I started to try and make games. Today I speak to you on the matter of learning how to make networked applications, and with this knowledge, to make a very small, simple, and well explained example of an aplication that can send a receive data, let's say.. a line of text. But.. I have found myself in some sort of dead end. You see, as most people I tought that I was just going to use DirectPlay, but I found out that it was declared deprecated, so on to winsock it was. I assumed that it was going to be as easy as learning any other thing, but.. for some reason I just can't figure it out! I've seen the sample program "Rock, Scissors, Paper.." and other stuff from the FAQ, I've also searched on the MSDN, and in a couple of more places, but I just can't get used to how it works.. Maybe it's just me, and after I'm done with the universite exams of the next 2 weeks I'll be able to see it.. But if not, I would reeeeeaaaaallyyy appretiate some help on this. What I want to make is an client-server aplication, it would do this: (after you start the server) "the clients requests and gets a connection to the server by typing the IP address. you tipe some text and send it trhu the server to all other clients. the received text is displayed on screen. clients can write as many times as they want. then they terminate their conection and the aplication exits." I think that the best and most useful way to show this would be with a simple console aplication, and using asychronous sockets, by passing messages like with the windows procedure. So.. I'm not asking to some of the most experticed members to write this for me, you see, I know well the theory, but somehow I fail to use it in practice.. So what I'm asking you people is just to help me make this in any way you can, and I'll add some final touches and useful comments inside the code so no one has to be in my position. Thanks in advance. ZippoLag.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
google using combinations of keywords

client server TCP Source code sample c++ winsock

and you will find sample programs to do a simple client server.

Share this post


Link to post
Share on other sites
oooohhhhhh myyyy gooooddness!!

Beej's guide it's simply beautiful!!
I'm actually kicking myself right now because I forgot to bring a diskette here and I can't take it home for a proper reading, I should just save some money and buy me a pen drive or an ipod..

Share this post


Link to post
Share on other sites

This topic is 4165 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this