sadam.tcpSender questions
Some questions for Adam.
I have been using this for sending a dmx stream over ethernet to an interface. It works fine on a mac.
On the mac I have figured out ('reverse engineered') the error messages that come from this object:
0= no error
61= unable to bind to port
60= unable to connect to tcp address
13= as above(?)
Are these correct?
I use these error messages in my patch (if it can't connect, the patch will then gate the data stream).
Upon porting to windows, the .mxe equivalent seems to send a zero error for all conditions. Although I've only tried sending to localhost.
Question is why are they different, is it because the object parses OS-generated errors?
Would the only zero condition a bug?
Or does it indicate I should configure the windows os / networking differently? Any tips in this regard?
Also, if I have the interface connected up, everything works fine, but if it is not connected, Max will freeze/crash. This does not happen on a mac with the .mxo version. Is there a way to avoid this crashing?
and thanks (again) for your library of objects :)
T
btw using max 6.5
bump (apologies)
Sorry, I've not seen this thread earlier. So, the error messages are the error messages that the OS itself gives; I've no control over these, nor can really interpret them for you, as they depend entirely on the OS. On the Mac, 0 indeed means that everything is OK. On Windows, 0 should mean that everything is fine and any other number should mean that an error happened, although it can happen that I have some stupid bug which won't give you the error codes on Windows.
More generally, regarding Windows, well, I don't use Windows at all. I just have a 30 GB partition with a virtual Windows XP on my machine, which I only use to create the MXE versions. But I don't have the means to test them. So, it can be a bug of the object (which I doubt, since on the Mac they work fine) as well as an OS-related issue, which unfortunately I can't really solve (I haven't used Windows for the past 7 years and I'm not very 'fluent' with that system). However, is it possible that it's actually not crashing, just hanging? With TCP (specially, if it can't connect to the specified address), it can happen that the OS blocks the entire process for a minute or two before responding. Although theoretically my objects shouldn't block Max itself in such a case, I'm not that sure whether the Windows version wouldn't block Max in such cases.
Thanks for using my library.
Best,
Ádám
Hey Adam, thanks for the detailed reply.
I've figured a workaround which is to intercept the messages your object sends to the max window, and act on those rather than the (lack of (distinction between)) error messages.
Re the crashing it could be max hanging sometimes, other times it completely exits-- so I think they're two different (probably unrelated) issues in my patch.
will let you know of anything else I come across.
thanks again