Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 877 Bytes

File metadata and controls

37 lines (24 loc) · 877 Bytes

udp_with_python

Small scripts for communicate with udp in python.

Quick Start Examples

In your codes you can simply use udp classes like this;

Server
from UdpAsynchronous import UdpAsynchronousServer

udp_server = UdpAsynchronousServer("127.0.0.1", 20001, 1024) # create object from server class.

while(True):
    udp_server.read() # you can receive datas with loop.
    print(udp_server.recieved_data)
    print(udp_server.from_where)
Client
from UdpSynchronous import UdpSynchronousClient

udp_client = UdpSynchronousClient("127.0.0.1", 20001, 1024) # create object from client class.

while(True):
    udp_client.write(['a', 'b', counter]) # you can sent your datas with "write" function.