The TCP/UDP Socket debugging tool provides five Socket debugging solutions : TCP Server, TCP Client, UDP Server, UDP Client, and UDP Group .
The following is a brief usage process:
TCP communication test:
1) Create TCP Server
Select the TCP Server on the left , and then click the "Create " button. The software will pop up the listening port input box.
After entering the listening port, a TCP Server Socket listening on the specified port is created . When the TCP Server Socket is created, the software will automatically start the TCP Server Socket in the listening state:
2) Create TCP Client
Select the TCP Client on the left, then click the "Create " button, and the software will pop up an input box:
After confirmation, the software creates a TCP Client Socket.
When creating a TCP Client Socket , the software will not automatically connect to the Socket .
2) Connect Socket
Click on the newly created TCP Client, and its related operation panel will appear on the right. Click the "Connect " button to connect to the Socket .
At this time, the TCP Client establishes a connection with the TCP Server . Under the TCP Server , a Socket corresponding to the connection is automatically added .
3) Data sending and receiving
After the connection is successfully established, you can test data sending and receiving:
When the mouse clicks on each Socket , the software will provide a panel for operating the Socket on the right . A window for data transmission and reception is provided in the panel. The bottom one is the data sending window.
Click on the Socket on the TCP Server side , then enter the data 12345 in the operation panel , and then click Send :
The data can be received in the Socket of the TCP Client . You can click on the TCP Client Socket to view it.
On the contrary, TCP Client can also send data to TCP Server
About sending hexadecimal HEX format:
Select the option to display hexadecimal, and then you are in HEX input mode in the data sending window. Directly enter the HEX format content in it: such as 313233, and then click the send data button:
The Socket on the TCP Server side can receive data 123:
UDP communication test:
Create UDP Server and UDP Client respectively :
When the UDP Server is first successfully created, its counterpart IP and counterpart port are empty. It receive the data packet sent by the UDP Client before the UDP Server determines the counterpart IP and counterpart port and sends the data packet.
The UDP Client specifies the other party's IP and port number when it is created, so the two UDP Clients can also communicate with each other. The UDP Server must communicate with the UDP Client .
First, the UDP Client sends the data:
UDP Servers receive data
After the UDP Server receives the data from the UDP Client , its counterparty IP address and UDP port can be determined , and then the UDP Server can also send data to the UDP Client :
Testing about UDP broadcast:
When creating a UDP Client , you can choose whether to create a UDP broadcast:
After clicking on the broadcast address, the software will automatically calculate the broadcast address:
After clicking OK, the created UDP Socket will send UDP broadcast packets .
UDP multicast test
1) Create UDP group
Select the UDP Group on the left , and then click the "Create " button. The software will pop up the multicast address or multicast port input box.
After clicking OK, a multicast UDP Socket is created:
On another computer connected to the Internet, create a multicast UDP Socket with the same multicast address and multicast port. Then you can perform UDP multicast communication, and you can also receive the multicast sent by yourself.