|
From: Stephen S. <rad...@gm...> - 2008-12-23 19:03:05
|
On Sun, Dec 21, 2008 at 3:17 AM, Kentaro Fukuchi <fu...@me...> wrote: > Hi Steve, > > It's really nice to have a keep-alive TCP connection of OSC server. > > On Wed, 17 Dec 2008 15:59:58 -0500 > "Stephen Sinclair" <rad...@gm...> wrote: > >> So that tells me it might be better to leave them open, so I tried >> this. It worked for a single connection, by adding a >> "connected_socket" member to the lo_server structure, and polling that >> instead of the "socket" member. However, I quickly realized that this >> would mean that lo_server would need a data structure to track _all_ >> open sockets. > > Common server programs using TCP have the same data structure to track them. > For blocking server, you can use select() system call. Exactly, it's already using select() for Windows and poll() for *nix, so it should be fairly easy to support this. I already started working on a patch but it's not ready yet. So far I'm using a linked list to keep the socket information, but I'm trying to decide if this approach is more complex than necessary. Maybe Steve H. can tell me, but I'm not actually sure what advantage poll() has over select(), actually. >> I'll probably play with it a little more this week, but any ideas are >> welcome. Does anyone have any experience with other TCP >> implementations of OSC? I'd like it if TCP was useable between >> different implementations. > > OscP5 seems to have a keep-alive TCP connection support. I just quickly > read the source and didn't test it. Thanks for pointing that out, I hadn't even heard of this implementation. I haven't used Processing, but it certainly seems like fun. :) Steve |