View Full Version : Qt network step by step tutorial

1st September 2012, 10:44
Hello. I need to make application which could connect with itself:

(on my pc) (other pc)
[myapp] <-- --> [myapp]

I've never wrote anything using qtnetwork so I need something really simple, first network app, just creating empty server, because I feel quite lost in tons of lines from advanced network applications. Does someone know good page/tutorial where I could find something like this? Because now I even can't listen from new tcpserver and I even don't know if it's natural.

1st September 2012, 11:35
The documentation contains simple examples.

1st September 2012, 11:53
Maybe it's good idea, and one more question, If I want make situation like I explained above, Can I make my program server and client at the same time? Or how can I establish communication between 2 exactly the same applications?

1st September 2012, 12:01
There are lots of different ways you can communicate between two instances of the same program. One of them, a network connection, being one of the most used ones.

You can have a client and a server in the same program without any problem. You should try to create some basic flowchart or diagram or whatever to find out how you can implement this. There are different ways to do this. Each with advantages and disadvantages.