In this recipe, we will learn to make a client and will see how it can send messages to the server. The main idea is to understand how a message is sent, how the server listens to the port, and how communication is established between the two.
Establishing client-server communication
How to do it...
To send messages to the server, we will be making use of the Line Edit and Push Button widgets. The message written in the Line Edit widget will be passed to the server on the click of the push button. Here is the step-by-step procedure for creating a client application:
- Create another application based on the Dialog without Buttons template.
- Add QLabel, QTextEdit, QLineEdit, and QPushButton to the form by dragging and dropping...