2016-04-29 05:49:47 -07:00
|
|
|
#!/usr/bin/python
|
|
|
|
import socket
|
2016-05-05 16:57:29 -07:00
|
|
|
import os
|
2016-04-29 05:49:47 -07:00
|
|
|
|
2016-05-05 16:57:29 -07:00
|
|
|
UDP_IP = os.getenv('TREZOR_UDP_IP', '127.0.0.1')
|
|
|
|
UDP_PORT = int(os.getenv('TREZOR_UDP_PORT', '21324'))
|
2016-04-29 05:49:47 -07:00
|
|
|
MESSAGE = b'Hello, World!'
|
|
|
|
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
|
|
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
|
2016-05-05 17:11:25 -07:00
|
|
|
|
|
|
|
while True:
|
|
|
|
print(sock.recv(64))
|