NetworkComms V3 of UDP broadcast message sent

NetworkComms network communication frame Preamble

NetworkComms communications framework, is a communications framework written in c # language from the United Kingdom, which lasted six years of research, mature and reliable performance.

NetworkComms v3 currently only supports basic UDP traffic

UDP traffic is a very powerful feature is the UDP broadcast.
Allows a packet transmitted on the network, a plurality of adapters may be received.
The following scenario may be considered to use UDP communication

1: Which network endpoints online check

2: Notification network endpoint has a new service

3: transmission of information to a group of endpoints

Use networkComm V3 sends a UDP packet

UDPConnection.SendObject ( "the ChatMessage", "This IS Test The Broadcast Message!",
New new the IPEndPoint (IPAddress.Broadcast, 10000));
the use of the received data packet networkComms V3



//开始监听进入的UDP数据
Connection.StartListening(ConnectionType.UDP, new IPEndPoint(IPAddress.Any, 10000));
//处理UDP数据
NetworkComms.AppendGlobalIncomingPacketHandler<string>("ChatMessage",
(packetHeader, connection, incomingString) =>
{
Console.WriteLine("\n ... Incoming message from " +
connection.ToString() + " saying '" +
incomingString + "'.");
});

Original: http: //www.networkcomms.net/udp-broadcasting/

networkcomms.cn finishing


---------------------
Author: networkcomms
Source: CSDN
Original: https: //blog.csdn.net/networkcomms/article/details/44218113
Disclaimer: This article as a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/Jeely/p/10972183.html