sory but i want to send message to all microsoft and linux client without any client application on my client
use IO::Socket::Multicast;
# create a new UDP socket ready to read datagrams on port 1100
my $s = IO::Socket::Multicast->new(LocalPort=>1100);
# Add a multicast group
$s->mcast_add('225.0.1.1');
# Add a multicast group to eth0 device
$s->mcast_add('225.0.0.2','eth0');
# now receive some multicast data
$s->recv($data,1024);
# Drop a multicast group
$s->mcast_drop('225.0.0.1');
# Set outgoing interface to eth0
$s->mcast_if('eth0');
# Set time to live on outgoing multicast packets
$s->mcast_ttl(10);
# Turn off loopbacking
$s->mcast_loopback(0);
# Multicast a message to group 225.0.0.1
$s->mcast_send('hello world!','225.0.0.1:1200');
$s->mcast_set('225.0.0.2:1200');
$s->mcast_send('hello again!');
update (broquaint): added <code> tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.