Skip to content

UDP request buffer protocol #9338

Sep 17, 2022 · 6 comments · 7 replies
Discussion options

You must be logged in to vote

@krishnak recvfrom() returns a tuple consisting of data and addr. So you could change your script for instance to:

client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
data = b'\x1b' + 47 * b'\0'
    
client.sendto(data,socket.getaddrinfo(addr,123)[0][4])

data, addr_s = client.recvfrom(1024)
if data:
    t = (struct.unpack('!12I', data)[10])

Replies: 6 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@krishnak
Comment options

@krishnak
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@davefes
Comment options

@krishnak
Comment options

@davefes
Comment options

@krishnak
Comment options

Comment options

You must be logged in to vote
1 reply
@krishnak
Comment options

Answer selected by krishnak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants