mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-18 14:40:25 -04:00
rename
This commit is contained in:
parent
dac26e1abb
commit
90049c80af
15 changed files with 0 additions and 0 deletions
16
Security_examples/python_sockets/udp_client.py
Normal file
16
Security_examples/python_sockets/udp_client.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import socket
|
||||
|
||||
HOST = '127.0.0.1'
|
||||
PORT = 9000
|
||||
DATA = 'AAAAAAAAAA'
|
||||
|
||||
def udp_client():
|
||||
|
||||
client = socket.socket( socket.AF_INET, socket.SOCK_DGRAM)
|
||||
client.sendto(DATA, ( HOST, PORT ))
|
||||
data, addr = client.recvfrom(4096)
|
||||
print(data, adr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
udp_client()
|
Loading…
Add table
Add a link
Reference in a new issue