[Libwebsockets] [libwebsockets] #42: calculates number of actually sent bytes incorrectly in libwebsockets_write

Trac trac at libwebsockets.org
Thu Oct 17 16:47:37 CEST 2013


#42: calculates number of actually sent bytes incorrectly in libwebsockets_write
-------------------------------------+-----------------
  Reporter:  andreaspakulat          |      Owner:
      Type:  defect                  |     Status:  new
  Priority:  major                   |  Milestone:
 Component:  libwebsocket test apps  |    Version:
Resolution:                          |   Keywords:
-------------------------------------+-----------------

Comment (by andreaspakulat):

 Setting rx_buffer_size does not seem to help, note that I'm using lws on
 the server side of things. I'm now setting it to 64K and trying to send
 32K of payload, splitting my actual data using fragments.

 The first 3-4 websocket frames are smaller than 512 bytes and go across
 without issue. The next one is the 500K frame and handing over the first
 32K of it to lws lets me run into that new code block you added in
 759f4ac4e54642e07c8eabb5cc8c7794fec19b62, i.e. I see "partial send 32772
 sent, 22976 accepted" here.

 Just re-sending the first frame seems to confuse the client, which is
 still waiting on the data of the first frame and hence ends up not reading
 any further from the socket which leads to the server not being able to
 write out anything anymore at some point.

 Not re-sending the first frame leads to the same issue as far as I can
 see.

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/42#comment:6>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list