Send multicast messages:
Static Void Main ( String [] ARGs) {udpclient = New Udpclient (); ipendpoint broadcastip = New Ipendpoint (IPaddress. parse ( " 224.0.0.122 " ), 4533 ); Int I =0 ; While ( True ) {Console. writeline (I ); Byte [] B = encoding. utf8.getbytes ( " I play messages in a group " + I ++ ); Udpclient. Send (B, B. length, broadcastip); system. Threading. thread. Sleep ( 1000 );}}
Receive
Command r1 # sh ip pim ap r1 # sh ip pim rp r1 # sh ip pim rp cannot see RPr1 # sh IP mroute ip Multicast Routing Table Flags: D-Dense, s-Sparse, B-Bidir Group, s-SSM Group, C-Connected, L-Local, P-Pruned, R-RP-bit set, F-Register flag, t-SPT-bit set, J-Join SPT, M-MSDP created entry, X-Proxy Join Timer Running, A-Candidate for MSDP Advertisement, U-URD, i-Received Source Specific Ho St Report, Z-Multicast
The creation rule for an event is that the type must be a delegate type, that is, the delegate instantiates the eventThe case code is as follows:Here are the two methods to be delegated later: Public classEventManager {//The first method Public voidADD (intIintj) {intres = i +J; MessageBox.Show (Res. ToString ()); } //a second method Public voidSayHello (intIintj) {MessageBox.Show ("Hello Word"+ (i*j). ToString ()); } }This is the creation of the delegate
PIM-DM intensive mode)The PIM intensive mode is the preferred configuration in the multicast routing protocol. This Protocol is strongly supported by Cisco and provides easy configuration and troubleshooting methods. Similar to DVMRP, the PIM intensive mode does not have the characteristics of flooding or deleting. Therefore, it can still be used as an option for configuring short-term protocols for wide-area multi-point transfer. Meanwhile, the PIM S
I. Problems
GRE channel is used between r3 and r1. All router interfaces are configured as sparse-mode, and the R4 ip address is 1.1.4.4). However, R1 cannot ping multicast sources.Ii. below
Multicast source ----- R5------R3-------R223----R1 -- e0........................................ .... |........................................ .... |........................................ .... R4~~~~~~~~~~~~~~~~~~~~~
+ = Operator-= OperatorI learned about multicast delegation. Now let's talk about the + = Operator and the-= Operator.In our previous studies, we know that the + = Operator is used for auto-increment operations, but in the delegate, the + = operator has a new meaning.First look at an instance:First define a delegate typePublic delegate void del (int a, int B );Then define a delegate variable:Del delegate;Now, let's assume that we have the following me
x. y. Z. A can also receive it.
The following is an example of using the socket API to implement limited broadcast:Unit UDP;
Interface
UsesWindows, messages, sysutils, classes, graphics, controls, forms, dialogs, WinSock,Stdctrls;
ConstWm_sock = wm_user + 1; // customize Windows messagesUdpport = 6543; // set the UDP port number// Inaddr_allhosts_group = u_long ($ e0000001); // Class D address 224.0.0.1
(** Argument Structure for ip_add_membership and ip_drop_membership.* Ip_mreq is not defined
1. ssmping implements the multicast ping function specified by the rfc6450: https://tools.ietf.org/html/rfc64502. Ssmping's source package can be downloaded from here: https://launchpad.net/ubuntu/trusty/+package/ssmping3. Unzip and then execute the make report on CentOS Linux with the following error:Ssmpingd.c:44:error:dereferencing pointer to incomplete typeThe workaround is to edit the makefile file and add the following line:CFLAGS + =-d_gnu_sour
Wow, the multicast is a P4P protocol based, multi-functional, personalized player software. WOW Multicast integrates a new player engine, and is free BT on-demand software, the user only through a maximum of 30 seconds of buffer time can directly watch the rich film and television programs. Wow, it's a wow. Later, a set of online and local video software, speaking of video playback software, compared to a
/*************************************** ************** Function: Linux arm-Linux UPD multicast ** Time: 2006-03-07 ** Writing: Li Yinan ***************************************** *************/# Include # Include # Include # Include # Include # Include # Include # Include
Int Port = 6789; // Communication PortInt main (void){Int socket_descriptor;Struct sockaddr_in address;Socket_descriptor = socket (af_inet, sock_dgram, 0 );If (socket_descriptor =-1
(value)
{
_ Age = value;
});
}
Person. prototype =
{
Get Sex ()
{
Return _ sex;
},
Set Sex (value)
{
_ Sex = value;
}
};
Var person = new Person ();
Person. NameChanged = function ()
{
Alert (Event 1 );
}
Person. NameChanged = function ()
{
Alert (Event 2 );
}
Person. Name = Treenew;
Person. Age = 22;
Person. Sex = Man
Alert (The + person. Name + Age is + person. Age +. The Sex Value is + person. Sex );
Alert (person. _ sex); // undefined
Therefore, it is elegant to use javascript to implemen
Use the '-' operator to remove a delegate from a delegate chain1 classHelloWorld2 {3 //Defining delegate Types4 Delegate voidDelegationchain ();5 Static voidMain (string[] args)6 {7 //using a static method to delegate an instance8Delegationchain mydelegateone=NewDelegationchain (helloworld.fun2);9 //Instance delegate with instance methodTenDelegationchain mydelegatetwo=NewDelegationchain (NewHelloWorld (). FUN1); One //To define a delegate o
Use boost. signal
Boost. signal provides a multicast delegation mechanism through which the observer mode can be easily implemented:
Void print_sum (float x, float y){Std: cout }
Void print_product (floatX, floatY){Std: cout }
Void print_difference (floatX, floatY){Std: cout }Int main (){Boost: signal
Sig. connect (print_sum );Sig. connect (print_product );Sig. connect (print_difference );
Sig (5, 3 );}
The usage of the signal object is very simple.
If you are using. Net to develop a background system and want to view logs of multiple servers at the same time, you can use the UdpAppender of log4net to multicast log information, and then accept and view the log information on a desktop program.Therefore, an iTrace log is written to accept the viewer, source code
The service program requires iTrace. layout. dll, which is used to format the log information. A Bug in log4net. Util. Transform causes
Unicast is the process in which frames with specific target addresses arrive at the target address from the source. For example, if you say "Xiaoyue" to Xiaoyue ",
So only Xiaoyue promised you
Multicast: the address that the frame is sent to a defined group. For example, you say, "All men are here.
One hundred yuan ". A male will be here, and a female will not be here, because she will not care about you if she has no money.
Broadcast: Send frames
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.