Home > Back-end >  Java UDP receiver why don't receive the message?
Java UDP receiver why don't receive the message?

Time:11-29

When doing the UDP instance, the sender sends a success, but the receiver has been in a wait state,
Code is no problem, configuration environment is also no problem, the code can run on another computer, don't know where is wrong, to solve the...

CodePudding user response:

So you describe which fairy can know where the problem is, the key code stick

CodePudding user response:

Did you start the, have to start the receiver, restart the sender

CodePudding user response:

CodePudding user response:

Not start against, it is first start of the receiver, and then run the sender

CodePudding user response:

The receiver datagramPacket why new twice? The second datagramPacket listener port number?

CodePudding user response:

I'm only new datagramPacket a ah

CodePudding user response:

Sorry, wrong, what is your operating system? The firewall off?
In this machine to catch the loopback package, you can open a virtual machine, the service side, client deployed separately, and then respectively mount caught tools are caught, see the packet is not sent, not received, or the receiving end
UDP is a connectionless protocol, sent successfully said only the data sent, regardless of whether the other side received,

CodePudding user response:

This should be changed

CodePudding user response:

My is win10 system, the firewall is open, is McAfee

CodePudding user response:

Start the receiving end, send again,
  • Related