summaryrefslogtreecommitdiff
path: root/vpn/10.10.10.1~
blob: 7ec52f78f3034f2929703f5db91fec4d07c6e505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python

import socket

UDP_IP = ""
UDP_PORT = 5000

sock = socket.socket(socket.AF_INET, # Internet
                     socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
    data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
    print "received message:", data