CodePudding user response:
Different computers, even the same local area network (LAN) can also be broadcastCodePudding user response:
Yes, LAN broadcasting,CodePudding user response:
You first need to define your communication of several machines? What is the format of the communication? Such as JSON (UDP cannot exceed 65535 bytes), or 2 hexadecimal,Such as
A - B "{" source" : 'A', CMD: 'open the web page, url: "http://www.sohu.com"}
B - & gt; A {" source ": 'B', CMD: 'I've turned on the web page, url:' http://www.sohu.com ', HTML content: 'XXXX cannot exceed 60 KB oh'}
Note that A to B when Socket to like the EndPoint to write B IP and port,
B to A similarly
CodePudding user response:
UdpClient object,CodePudding user response:
UDP broadcast can fulfill your requirementsCodePudding user response:
TCP, UDP, WCF, Rometing can be implementedCodePudding user response:
UDP does not need to connect a handshake can send and receive messages, but also easy to lose packets, your thoughts can be on the same network segment XXX. XXX. XXX. 255 is sending a message broadcast messages, all the machines that are within the network segment can message is received,