The attached source code shows you how to use multi casting in a LAN environment. Multicasting provides many benefits over TCP socket. Performance of a multicast server is better than a broadcast server and it reduces the network load in some cases.
In this attached source code, IP address 224.0.0.l is an address of local subnet.
UDP protocol is connectionless. That means an application doesn't have to be in a connected state. In general, if we use TCP protocol and the server application is end ORClient end, an application throws an exception but this application has no problem.
If a user increases load on a TCP connection, the server performance is decreases but UDP multicast has no effects. If you need to transfer data (not too secure ) in a LAN network, UDP multicast is a better choice.
How to use the source code:
Run muticastsrv (as a server) on a local machine
Run muticastcli (as a client) on other local LAN machines. Order of start is free.
and type your massage in the server application and conform message in a client. A client application can start and stop feely.