View Full Version : Beginning network programming
Morea
28th May 2007, 23:18
I have created a simple little game, and I wish to make it play over network. The datatransfer is simple, they take turn sending 4 ints (the moves) to each other.
How do you write code for this?
I have never written network code before.
Morea
29th May 2007, 00:18
Should both clients have a QTcpServer running and let the other client connect to them? Or should only one be runnig as server?
wysota
29th May 2007, 00:30
It doesn't matter. For simplicity make only one of them a server.
Morea
29th May 2007, 20:39
I'm trying to work with the
http://doc.trolltech.com/4.3/network-fortuneclient.html
example, but how can I let the client send data back to the server?
Update: I think I got it! I just send back data and receive it with the socket that was given by the nextPending-something .
It worked! :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.