I am using netserver/netclient to send list of info that has been converted to a symbol using [list2symbol]. Somewhere in the process, some of the messages get chopped up at seemingly random points. The examples below only break at spaces, but sometimes it will break in the middle of the first work (i.e. mo tion).
I think the problem is on the [netclient] end because sometimes, one computer will work fine, and the other will chop up the messages. The patches are attached. They use Krzysztof Czaja's [tot] and zexy's [list2symbol].
Output from [netclient] (error messages preceed problem here): error: Bad arguments for message 'motion' to object 'canvas' NETCLIENT: motion 107 1 error: canvas: no method for 'float' NETCLIENT: 87 0 NETCLIENT: motion 111 191 0 NETCLIENT: motion 114 191 0 error: Bad arguments for message 'motion' to object 'canvas' NETCLIENT: motion 114 190 error: canvas: no method for 'float' NETCLIENT: 0 NETCLIENT: motion 114 189 0 NETCLIENT: key 1 98 0 NETCLIENT: key 0 98 0 NETCLIENT: key 1 110 0 NETCLIENT: key 0 110 0 NETCLIENT: key 1 error: canvas: no method for 'float' NETCLIENT: 103 0 NETCLIENT: key 0 103 0 bn ... couldn't create NETCLIENT: mouse 114 189 1 0 NETCLIENT: motion 115 189 0 NETCLIENT: mouseup 115 189 1 NETCLIENT: motion 115 188 0 NETCLIENT: motion 117 187 0 NETCLIENT: motion 119 187 0 error: Bad arguments for message 'motion' to object 'canvas' NETCLIENT: motion 120 187 error: canvas: no method for 'float' NETCLIENT: 0 NETCLIENT: motion 119 187 0 NETCLIENT: motion 118 187 0 NETCLIENT: motion 108 185 0 NETCLIENT: motion 96 183 0 NETCLIENT: motion 63 179 0 NETCLIENT: motion 21 181 0
Input into [netserver]: print: broadcast motion 107 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 111 191 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 114 191 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 114 190 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 114 189 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 1 98 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 0 98 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 1 110 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 0 110 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 1 103 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast key 0 103 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast mouse 114 189 1 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 115 189 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast mouseup 115 189 1 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 115 188 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 117 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 119 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 120 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 119 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 118 187 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 108 185 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 96 183 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 63 179 0 netserver: sending data to client 2 on socket 9 netserver: sending data to client 1 on socket 8 print: broadcast motion 21 181 0
http://at.or.at/hans/
Hi Hans-Christoph,
does this error appear at all 'speeds' or is it getting worse the more data you send? I once had a similar problem with netcient dropping / 'manipulating' data when I was sending too fast.
There is a
#define DEFPOLLTIME 20 /* check for input every 20 ms */
in the code which means netclient polls for input every 20 ms using a clock. This should probably be changed to a lower value. Or to make it really perfect, use sys_addpollfn and friends to let Pd poll for input. But I don't have time right now to code this...
The rest of the code is pretty much identical to the netsend / netreceive code. Does it happen as well in case you use these objects?
hope this helps, Olaf
Hans-Christoph Steiner schrieb:
I am using netserver/netclient to send list of info that has been converted to a symbol using [list2symbol]. Somewhere in the process, some of the messages get chopped up at seemingly random points. The examples below only break at spaces, but sometimes it will break in the middle of the first work (i.e. mo tion).
I think the problem is on the [netclient] end because sometimes, one computer will work fine, and the other will chop up the messages. The patches are attached. They use Krzysztof Czaja's [tot] and zexy's [list2symbol].
Faster speeds do seem to make it worse. If I move the mouse really
slowly, then it doesn't seem to happen. I tried recompiling with
#define DEFPOLLTIME 5 and it still had the same behavior. I guess it
needs a sys_addpollfn. I'll give it a shot and see what I come up with.
.hc
On Sunday, Sep 28, 2003, at 16:39 America/New_York, Olaf Matthes wrote:
Hi Hans-Christoph,
does this error appear at all 'speeds' or is it getting worse the more data you send? I once had a similar problem with netcient dropping / 'manipulating' data when I was sending too fast.
There is a
#define DEFPOLLTIME 20 /* check for input every 20 ms */
in the code which means netclient polls for input every 20 ms using a clock. This should probably be changed to a lower value. Or to make it really perfect, use sys_addpollfn and friends to let Pd poll for input. But I don't have time right now to code this...
The rest of the code is pretty much identical to the netsend / netreceive code. Does it happen as well in case you use these objects?
hope this helps, Olaf
Hans-Christoph Steiner schrieb:
I am using netserver/netclient to send list of info that has been converted to a symbol using [list2symbol]. Somewhere in the process, some of the messages get chopped up at seemingly random points. The examples below only break at spaces, but sometimes it will break in
the middle of the first work (i.e. mo tion).I think the problem is on the [netclient] end because sometimes, one computer will work fine, and the other will chop up the messages. The patches are attached. They use Krzysztof Czaja's [tot] and zexy's [list2symbol].
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
"[W]e have invented the technology to eliminate scarcity, but we are
deliberately throwing it away
to benefit those who profit from scarcity."
-John Gilmore
On Sunday, Sep 28, 2003, at 16:39 America/New_York, Olaf Matthes wrote:
Hi Hans-Christoph,
does this error appear at all 'speeds' or is it getting worse the more data you send? I once had a similar problem with netcient dropping / 'manipulating' data when I was sending too fast.
This happened when the data got fast. But it didn't need to be very fast to start happening.
There is a
#define DEFPOLLTIME 20 /* check for input every 20 ms */
in the code which means netclient polls for input every 20 ms using a clock. This should probably be changed to a lower value. Or to make it really perfect, use sys_addpollfn and friends to let Pd poll for input. But I don't have time right now to code this...
I tried #define DEFPOLLTIME 5 and that didn't seem to help. I just hacked netclient.c to use sys_addpollfn, and unfortunately that didn't seem to help either. (I attached my sys_addpollfn version of netclient).
The rest of the code is pretty much identical to the netsend / netreceive code. Does it happen as well in case you use these objects?
Unfortunately, I don't get this bug with netsend/netreceive at all. I was trying to move quite fast on my patch, and I didn't get a single hiccup. With netclient/netserver, I would have had many. I'll start trying to debug it a little more, but any suggestions/etc would be helpful.
.hc
hope this helps, Olaf
Hans-Christoph Steiner schrieb:
I am using netserver/netclient to send list of info that has been converted to a symbol using [list2symbol]. Somewhere in the process, some of the messages get chopped up at seemingly random points. The examples below only break at spaces, but sometimes it will break in
the middle of the first work (i.e. mo tion).I think the problem is on the [netclient] end because sometimes, one computer will work fine, and the other will chop up the messages. The patches are attached. They use Krzysztof Czaja's [tot] and zexy's [list2symbol].
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
There is no way to peace, peace is the way.
-A.J. Muste