def start_socket() :
readbuffer = ''
sock.connect(("riboflav.in", 6667))
while True :
readbuffer = readbuffer + sock.recv(1024)
temp = string.split(readbuffer, "\n")
readbuffer = temp.pop()
for line in temp :
body = {
'uuid' : str(uuid4()),
'raw' : line,
'args' : line.split(),
'host' : host,
'port' : port,
'time' : time(),
'event': "socket"
}
channel.basic_publish(exchange='stream', routing_key='', body=dumps(body))
评论列表
文章目录