|
From: Stephen S. <rad...@gm...> - 2012-02-28 16:18:41
|
Hm on second thought the patch seems to cause testlo to fail on a TCP test. Will try to look into it today.. Steve On Tue, Feb 28, 2012 at 11:09 AM, Stephen Sinclair <rad...@gm...> wrote: > Camille, > > Finally got around to it. Yes, I believe you're right.. when the > listening socket signals an event, it only means it's ready to accept > a connection, not that it is ready to be read(). I've applied your > patch privately, I'll commit it soon. > > Just a clarification, when you say your application "hangs", do you > mean it pauses temporarily or that it actually stalls permanently? > Just wondering because I can see the reason for a pause, but can't see > why it would cause permanent damage -- lo_send() always sends data > along with the connection request afaik. > > Also, in reading up a bit I see that there is the potential for a race > condition between select()/poll() and accept(), which requires the > listening socket be set non-blocking. (Which _would_ lead to a > permanent hang.) I'll fix this now that I see it. Great that someone > other than me is testing the TCP implementation! :) > > Steve > > > On Fri, Feb 17, 2012 at 3:52 AM, Camille Troillard > <ca...@os...> wrote: >> Hi, >> >> When a liblo server is configured with a TCP socket, it manages one listening socket and a list of streaming sockets. The code to read from TCP sockets is in server.c, in lo_server_recv_raw_stream, line 665. In this function, is an event happened on the listening socket, we call the function accept, and then if everything went fine, proceed to reading the first packet. >> >> There is a problem that causes my application to hang while waiting for the first packet of data, just after a connection has been accepted. In fact, once a socket is accepted, liblo should not try to read from it, but instead give up control to the application. >> >> Attached is a patch that attempts to fix that. I hope I got the logic right. >> >> >> Best, >> Cam >> >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> liblo-devel mailing list >> lib...@li... >> https://lists.sourceforge.net/lists/listinfo/liblo-devel >> |