# -*- coding: utf-8 -*-

from discovery import EndPoint, PingNode, PingServer

my_endpoint = EndPoint(u'192.168.1.192', 30303, 30303)
their_endpoint = EndPoint(u'127.0.0.1', 30303, 30303)

server = PingServer(my_endpoint)

listen_thread = server.udp_listen()
listen_thread.start()

server.ping(their_endpoint)

fe0ba86e1791db4907447183c46345dac4daef81
<mask token>

<mask token>
listen_thread.start()
server.ping(their_endpoint)

<mask token>
my_endpoint = EndPoint(u'192.168.1.192', 30303, 30303)
their_endpoint = EndPoint(u'127.0.0.1', 30303, 30303)
server = PingServer(my_endpoint)
listen_thread = server.udp_listen()
listen_thread.start()
server.ping(their_endpoint)

from discovery import EndPoint, PingNode, PingServer
my_endpoint = EndPoint(u'192.168.1.192', 30303, 30303)
their_endpoint = EndPoint(u'127.0.0.1', 30303, 30303)
server = PingServer(my_endpoint)
listen_thread = server.udp_listen()
listen_thread.start()
server.ping(their_endpoint)

# -*- coding: utf-8 -*-

from discovery import EndPoint, PingNode, PingServer

my_endpoint = EndPoint(u'192.168.1.192', 30303, 30303)
their_endpoint = EndPoint(u'127.0.0.1', 30303, 30303)

server = PingServer(my_endpoint)

listen_thread = server.udp_listen()
listen_thread.start()

server.ping(their_endpoint)
