16 lines
378 B
Python
Executable File
16 lines
378 B
Python
Executable File
#!/usr/bin/env python
|
|
# $Id: heartbeatmsg,v 1.2 2005/02/27 16:41:40 andreas Exp $
|
|
import time, socket
|
|
|
|
ADDR="204.29.161.33"
|
|
#ADDR="10.99.1.4"
|
|
PORT=50003
|
|
SERVICE="service"
|
|
|
|
iam=socket.gethostname()
|
|
sock=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
msgboot="msg=This is a test;service=%s;name=%s" % (SERVICE, iam)
|
|
sock.sendto(msgboot, (ADDR, PORT))
|
|
time.sleep(1)
|
|
sock.close()
|