Udp over windows

David Pagnon's icon

Hi all,

First I'm sorry if this issue has been documented already. I couldn't find anything about it though. Also, I'm kind of a noobie concerning udp.

So here is the thing : I'm trying to send data from a udp client to a udp server. The client is built in C, and the server is on max 8 windows (I'm using the tool sadam.udpReceiver). It doesn't work. But this is weird on different levels :
- The exact same code works just fine if I send the data to a Mac.
- On windows, nothing happens on Max. However when I run the tool "SocketTest.exe" and listen to the specific IP and port, I get what I send.

Which makes me think that the client works fine, that my windows computer works fine, it's just as if Max didn't listen to the right port of the right IP. I don't quite get the potential differences in the configurations between Mac and Windows, however the obvious difference between SocketTest and udpreceiver is that in the first one I can set an IP to listen to.

Two questions then :
- Is there any way to ask sadam.udpReceiver to listen to a specific IP? Or is it possible to have access to its code to tweak it?
- Also, please spare me a doubt: you don't need to set an ip on the server side, right? You just need to listen to a port. But what if you have several ethernet connexions, which means several IPs? How does the server choose between those IPs?

Thanks in advance !

David Pagnon's icon

Okay, first question answered:
On the client side, I'm using INADDR_ANY, which means that my server will be listening to all IPs. So I shouldn't have to specify an IP on the server side.

Now I still can't understand why:
- Max won't get any data, while it works with an other software
- Max does get the data on Mac

David Pagnon's icon

Sorry for bumping up this topic!

Source Audio's icon

Why don't You try udpreceive - vanilla max object ?

David Pagnon's icon

Thanks for answering!
However I'm afraid I have no idea what you're talking about. What's vanilla? Does it mean something like native objects? (I'm not a native english speaker so I may be missing some of the jargon :D )

If it's what you're talking about, I tried. It doesn't work, neither on mac nor on windows, since it's expecting OSC format and this is not what I'm sending. However, at least Max on mac tells me there is an error. Max on windows doesn't even seem to realize that I'm trying to reach it.

Something tells me that it's just that max on windows is not exactly like max on mac... However I'm still surprised, it would be a massive pain if none of the windows users could use distant udp protocols to comminicate with their apparatus. At least, being sure of it would let me get over it!

David Pagnon's icon

So, some news about it. My udpreceive is working on max7, but not on max8. I tried on a different windows machine though, it worked fine on both versions of Max.

This is still a mystery.
I'm going to try and update my version of Max, we never know.