我已经编制好了一个PYTHON脚本,能够在LINUX上发送多播数据。其实编制起来也不算太麻烦。具体代码如下:
#!/usr/bin/env python
from socket import *
from time import sleep,time,ctime
HOST = '229.0.0.15'
PORT = 9999
BUFSIZ = 1024
ADDR = (HOST, PORT)
udpCliSock = socket(AF_INET, SOCK_DGRAM)
data = 't'*200
count = 0
while(count<100 ):
udpCliSock.sendto(data, ADDR)
sleep(1)
count = count+1
udpCliSock.close()