PDA

View Full Version : Qt network step by step tutorial



Lapsio
1st September 2012, 11: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.

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

Lapsio
1st September 2012, 12: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?

tbscope
1st September 2012, 13: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.