pyuv icon indicating copy to clipboard operation
pyuv copied to clipboard

pyuv UDP multi-NIC, Send A-IP? and Recv B-IP?

Open wolance opened this issue 6 years ago • 6 comments

hi, dear... UDP Server bind 0.0.0.0 1234 but server have two NIC, and ip address... one is 192.168.1.2 , the other is 192.168.1.3 .. UDP Client send 192.168.1.2 1234....but recv none data... i use pcap find...
192.168.0.100:56443 -> 192.168.1.2:1234 192.168.1.3:1234 -> 192.168.0.100:56443

why ip is different...why client dont recive.... why server recv have not use the 192.168.1.2... my code fragment UDP Server: the same as UDP Server Example UDP Client: only one hande

wolance avatar Dec 19 '19 03:12 wolance

Is the server responding t in the source address?

saghul avatar Dec 20 '19 08:12 saghul

... i bind 0.0.0.0 1234... i recv the client handle...and handle.sendto.....and not set any ip address...but, client recv server ip have a different

wolance avatar Dec 23 '19 05:12 wolance

Can you paste the code for sending the response back?

saghul avatar Dec 23 '19 07:12 saghul

def on_read(self, handle, ip_port, flags, data, error):
    handle.send(ip_port, 'hi')

same as udp server example, i have not added other code....

wolance avatar Dec 23 '19 08:12 wolance

what ip_port do you receive? can you print it?

saghul avatar Jan 07 '20 15:01 saghul

What happened after that? Is oneself logical error?

DimensionNightmare avatar Apr 30 '20 08:04 DimensionNightmare