ó 6”ţfc@s}dZdZdZdZddlZddlZddlZddlZd„Zd„Z d„Z e d kryeƒndS( iťs 225.0.0.250s'ff15:7079:7468:6f6e:6465:6d6f:6d63:6173ii˙˙˙˙NcCsMdtjdkrtnt}dtjdkr?t|ƒn t|ƒdS(Ns-6is-s(tsystargvt MYGROUP_6t MYGROUP_4tsendertreceiver(tgroup((s*/usr/lib64/python2.7/Demo/sockets/mcast.pytmains cCsŰtj|dƒd}tj|dtjƒ}tjdtƒ}|dtjkrp|jtj tj |ƒn|jtj tj |ƒxKt rÖttjƒƒ}|j|d|ddtfƒtjdƒqŒWdS(Nis@itii(tsockett getaddrinfotNonet SOCK_DGRAMtstructtpacktMYTTLtAF_INETt setsockoptt IPPROTO_IPtIP_MULTICAST_TTLt IPPROTO_IPV6tIPV6_MULTICAST_HOPStTruetreprttimetsendtotMYPORTtsleep(Rtaddrinfotstttl_bintdata((s*/usr/lib64/python2.7/Demo/sockets/mcast.pyRs "cCsPtj|dƒd}tj|dtjƒ}|jtjtjdƒ|jdtfƒtj |d|ddƒ}|dtj krÁ|t j dtj ƒ}|jtjtj|ƒn/|t j ddƒ}|jtjtj|ƒxYtrK|jdƒ\}}x|dd kr.|d }qWt|ƒd t|ƒGHqóWdS( Niitis=Is@IiÜi˙˙˙˙Rs (R R R R Rt SOL_SOCKETt SO_REUSEADDRtbindRt inet_ptonRR Rt INADDR_ANYRtIP_ADD_MEMBERSHIPRtIPV6_JOIN_GROUPRtrecvfromtstrR(RRRt group_bintmreqRR((s*/usr/lib64/python2.7/Demo/sockets/mcast.pyR1s t__main__( RRRRRR R RRRRt__name__(((s*/usr/lib64/python2.7/Demo/sockets/mcast.pyt s