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 stickCodePudding user response:
Did you start the, have to start the receiver, restart the senderCodePudding user response:
CodePudding user response:
Not start against, it is first start of the receiver, and then run the senderCodePudding user response:
The receiver datagramPacket why new twice? The second datagramPacket listener port number?CodePudding user response:
I'm only new datagramPacket a ahCodePudding 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 changedCodePudding user response:
My is win10 system, the firewall is open, is McAfeeCodePudding user response:
Start the receiving end, send again,