You are not logged in.

Search results

Search results 1-2 of 2.

Monday, January 12th 2009, 7:27pm

Author: xizhizhu

Socket communication with TCP client/server sample code

http://xizhizhu.blogspot.com/2009/01/qt-…munication.html 1.QTcpSocket QTcpSocket is used as the TCP socket in Qt. It's used both in client and server side. To perform as a client, following steps are used: a) call QTcpSocket.connectToHost() to connect to a server; b) when connected, QTcpSocket.connected() will be emitted; c) communicate with the server. The following code shows a simple client sending "Hello, world" to the server. Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21...

Monday, January 12th 2009, 7:23pm

Author: xizhizhu

SSL communication with client sample code

http://xizhizhu.blogspot.com/2009/01/qt-…munication.html SSL is widely used nowadays to provide secure communication, which performs as a new layer between TCP and application. In Qt, the QSslSocket class provides an SSL encrypted socket for both servers and clients. 1.Client The following steps are most commonly used: a) call QSslSocket.setProtocol() and other functions to set the parameters of SSL; b) call QSslSocket.connectToHostEncrypted() to connect to a server; c) the QSslSocket.encrypted(...