Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

UDP question

$
0
0
Hello

I am having question about UDP. As we know UDP is connectionless so

1) $s = UDPBind("127.0.0.1", 1234)
2) $d = UDPRecv($s, 4096,1)
3) UDPSend($s,$d+something())

Now then question is: if $s has more than 1 connection, then how do I make sure that UDPSend sends it to right place? As it dont have any accept function $s could be con1, con2, ..., conN. As  UDP udp is connectionless, there is no way to get socket info, but still if multiple clients connect from same IP and same port, and client specific info cannot and will not be included in packets, what do I do?

But what if I want this packet to go con1 and that packet to go con2? How I should handle that? TCPRecv allows me to get IP, port, but that's not enough.

However if i connect to server:1234 then it says incoming connection client:59939. Now is this port somewhat unique? it looks so.  But I have no idea how to use that.

Viewing all articles
Browse latest Browse all 12506

Trending Articles