python:使用udp协议发送飞秋消息

#coding:utf-8

import socket
for i in range(200):
	sock =socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
	host = '192.168.0.102'
	port = 2425
	#print 'this is socket_client'
	sock.connect(('192.168.0.102',2425))
	context = '1_lbt4_10#32899#002481627512#0#0#0:1289671407:Administrator:MICROSO-697TGLD:288:hello. '
	sock.send(context)
	#print sock.recvfrom(512)
	#sock.close()

你可能感兴趣的:(python)