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

OSC server can't receive broadcast message #147

Open
alienshek337 opened this issue Dec 31, 2021 · 3 comments
Open

OSC server can't receive broadcast message #147

alienshek337 opened this issue Dec 31, 2021 · 3 comments

Comments

@alienshek337
Copy link

I want to make a server/client then send and receive broadcast message.

For the client, I used :
client = udp_client.SimpleUDPClient("192.168.0.255", 10000)
client._sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
client.send_message("/abc" , "helloworld")

It is successful then I can receive the message from touchdesigner, but the osc server can't.

The server I just used the simple server:
ip = "192.168.0.140"
port = 10000
server = osc_server.ThreadingOSCUDPServer((ip,port), dispatcher)
server.serve_forever()

The server can receive the osc message from IP "192.168.0.140", but not the broadcast IP "192.168.0.255".

@high-solutions
Copy link

high-solutions commented Nov 14, 2022

You need to set the "server ip" to 192.168.0.255
It can't listen to both at the same time as far as i know

To be honest i don't know why a server needs to be assigned to an ip adress really.
I have multiple interfaces with different ip's and there is an broadcast ip. It should be able to listen to all of them

@high-solutions
Copy link

high-solutions commented Nov 14, 2022

Or you can try to set server ip to 0.0.0.0
Just did see that in #144

@DrLuke
Copy link
Contributor

DrLuke commented Nov 18, 2022

When you set the server ip to a specific address, it will only receive messages addressed to that ip. If you want to receive all messages you have to set it to 0.0.0.0.

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