프로젝트 진행간에 테스트 용도로 급하게 만들어 보았다. 역시 이럴때는 Python 만한게 없다. :)
import socket
if __name__ == '__main__':
rcv_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
rcv_sock.bind(("10.100.10.90", 8889))
except:
print "Error at Binding"
while 1:
print "Listening..."
data, addr = rcv_sock.recvfrom(65535)
print "Got %s" % data
if __name__ == '__main__':
rcv_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
rcv_sock.bind(("10.100.10.90", 8889))
except:
print "Error at Binding"
while 1:
print "Listening..."
data, addr = rcv_sock.recvfrom(65535)
print "Got %s" % data