UDP is widely used in network applications that need to transmit data to each other, such as the UDP protocol used by QQ. In the case of bad network quality, the packet loss is very serious when using UDP protocol, but the UDP occupies less resources and the processing speed is fast,
UDP is widely used in network applications that need to transmit data to each other, such as the UDP protocol used by QQ. In the case of poor network quality, packet loss is very serious when using UDP protocol, but UDP consumes less resources, processing speed is fast, UDP
client.Problem one : The UDP message has a maximum length limit , so it is not possible to send one picture at a timesolution : Self-splitting transmission, reorganization at the receiving end, defining the message ClassClass packet{ int SN {get; Setbyte[] Data {get; Setbyte[] Tobytes () {...}} The segmentation message and the reorganization message are no longer detailed. After the message is sent, an end flag is sent, the receiving
, if the mobile device is connected to the local network socket server, the server will receive a broadcast from the client, and then the server and the received IP to connect with the client and then you can control and file transmission. It is important to note that the UDP broadcast will cause the network transmission speed is slow, and UDP is unreliable protocol, issued by the broadcast service end may
This article describes the Android programming implementation based on LAN UDP radio to automatically establish a socket connection method. Share to everyone for your reference, specific as follows:
Socket communication is often used in Android development. As a result of the project needs, a recent study of this knowledge. The demand is to achieve file transfer and control between the Android mobile devic
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.