We usually need to establish a Socket server or client on the local computer to test the software.
For example, to establish a Socket server, we can wait for the connection of the network client software and communicate with the client to test whether the client software is normal;
You can establish a Socket client to connect to the other party’s test server software to test whether the other party’s server software is normal.
1. The interface of the software is very simple. On the left, there are shortcut buttons for the client or server of tcp and udp, and there are option buttons such as [Create], [Delete], and [Exit] top.
2. Let's first build the TCP test server. Click [TCP Server] and then click [Create].
3. Choose a listening port, here we use 6001 as the listening port of the server.
4.After the establishment is completed, the server will automatically start, and the software will display the status of [start monitoring].
5. We can check whether the 6001 port of this machine has been opened. Enter the command [netstat -a] in the DOS window, you can see that the status of the 6001 port of the machine is listening in the list, indicating that the 6001 port of the machine is in the listening state.
6. Enter the command [telnet 192.168.0.140 6001] in the DOS window to log in to the local port 6001.
7. Click the Enter button, you can successfully log in port 6001. In the test software, you can see that the status is connected, and you can also see that the other party's ip is the local ip.
8. Let's test the communication again, enter a, b, c in the DOS window, you can see the received data in the receiving window of the software.
9. Enter 1234567890 in the sending window of the software. After clicking Send, you can see the data sent by the software in the DOS window.
10. After the test is completed, click [Stop Monitoring] in the software, and you can see [lost connection with the host] in the DOS window, indicating that the test connection has been disconnected.
11. To create a TCP client, click [TCP Client] and then click [Create]. The [Create socket client] window will pop up, enter the other party’s IP and the other party’s port, and click OK.
12. The TCP client has been established. If the other party's port is listening normally, click [Connect] to connect to the other party's port and test communication with the other party.