Created
January 19, 2022 13:34
-
-
Save Park-Developer/2aa8b48c6fbe92af13725c06f9096b72 to your computer and use it in GitHub Desktop.
Bot udp_client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) | |
while True: | |
#Error Case | |
#print("wait?") | |
#data,addr=sock.recvfrom(1024) | |
#print("Client is received data : ",data.decode()) | |
print("Client send") | |
data=input() | |
sock.sendto(data.encode(),('127.0.0.1',20162)) | |
data,addr=sock.recvfrom(1024) | |
print("Client is received data : ",data.decode()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment