I need to create a server client program which will contain following steps:

Server Side:

1) Create a thread.
2) Create a socket.
3) Bind this.
4) Listen it.
5) Accept.
6) Receive client data.
7) Send confirmation msg to client.

Client Side:

1) Create a thread.
2) Create a socket.
3) send any data to server side.
4) Receive confirmation msg from server.

It is going to be TCP-IP communication so I am thinking of using QTcpSocket class. Anybody who has any idea about this pls help. If you can provide me working code then that would be best thing...... Thanks in advance......