[Libwebsockets] a bug?
klervi - Alex Rhatushnyak
a.rhatushnyak at klervi.com
Tue Apr 2 01:41:07 CEST 2013
Without -u, after a couple of minutes
the last line on the server side is like this:
> [1364858671:1475] WARN: ERROR on accept: Too many open files
and the client keeps printing "final rx 8190" non-stop.
With -u: the same after ~7 minutes.
Second attempt with -u: the same after ~3 minutes.
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=`**pwd`/usr -DWITH_SSL=0
On Fri, Mar 29, 2013 at 11:15 PM, "Andy Green (林安廸)" <andy at warmcat.com>wrote:
> On 25/03/13 22:47, the mail apparently from klervi - Alex Rhatushnyak
> Hi Andy!
>> Without '-u', just
>> ./libwebsockets-test-client localhost
>> I observe the following after less than 5 minutes:
>> on the server side:
>> > [1364221837:7220] PARSER: written 55 bytes to client
>> > [1364221837:7225] PARSER: written 55 bytes to client
>> > [1364221837:7229] PARSER: written 55 bytes to client
>> on the client side:
>> "rx 8190 rx 8190 rx 8190 ..."
>> Until you stop one of them.
>> Looks like server only sends and client only receives messages.
>> With '-u', that is
>> ./libwebsockets-test-client localhost -u
>> the same "rx 8190 rx ..." pattern after less than 5 minutes on the
>> client side,
>> and similarly on the server side:
>> [1364222548:0620] PARSER: written 8194 bytes to client
>> [1364222548:0624] PARSER: written 8194 bytes to client
>> [1364222548:0628] PARSER: written 8194 bytes to client
>> OS X 10.8.2.
>> Please find the updated test-server.c and test-client.c attached.
> As I mentioned last week, relying on the OS to buffer large atomic packets
> is not a good proposition, instead you need to make use of the websocket
> protocol fragmentation.
> Attached are your demo programs rewritten to use fragmentation.
> Now they can send and receive 8190-size packets with a 1024 (or other)
> fragment size and corresponding rx buffer; we only ask the OS to buffer
> 1024 size packet for TX which is reasonable even on small embedded systems.
> Do you see any problems with these on OSX?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libwebsockets