Current location - Quotes Website - Team slogan - VB port monitoring program, monitoring port 5656. The source address IP is normal, and the source port number is negative.
VB port monitoring program, monitoring port 5656. The source address IP is normal, and the source port number is negative.
The port monitor should use UDP protocol. It is normal to get the source address IP, which just means that you can communicate with the source address. The source port number is not obtained by itself, but specified. For example:

Your own address is 192. 168.0.2 port: 105438+0.

The address of the source address is 192. 168.0.3 Port: 5656.

Then, your Winsock 1. Protocol = sckudprotocol UDP protocol is not set.

Then set the port Winsock1.localport =1001.

Then Winsock 1. Remote port = 5656.

Winsock 1。 remote host = " 192. 168 . 0 . 3 "

Bind the local port Winsock1.bind "192 438+068.0.2".

In this way, the monitoring is successful. I haven't tested this program. Please try to modify it according to your local configuration first.