Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wolance opened this issue Dec 19, 2019 · 6 comments
Open

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

wolance opened this issue Dec 19, 2019 · 6 comments

Comments

@wolance
Copy link

wolance commented Dec 19, 2019

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

@saghul
Copy link
Owner

saghul commented Dec 20, 2019

Is the server responding t in the source address?

@wolance
Copy link
Author

wolance commented Dec 23, 2019

... 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

@saghul
Copy link
Owner

saghul commented Dec 23, 2019

Can you paste the code for sending the response back?

@wolance
Copy link
Author

wolance commented Dec 23, 2019

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....

@saghul
Copy link
Owner

saghul commented Jan 7, 2020

what ip_port do you receive? can you print it?

@DimensionNightmare
Copy link

What happened after that? Is oneself logical error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants