[Libwebsockets] [libwebsockets] #40: Blocking client connection

Trac trac at libwebsockets.org
Mon Sep 23 03:59:36 CEST 2013

#40: Blocking client connection
  Reporter:  JM                     |      Owner:
      Type:  defect                 |     Status:  new
  Priority:  major                  |  Milestone:
 Component:  libwebsockets library  |    Version:
Resolution:                         |   Keywords:

Comment (by ryanking8215):

 It's not about fragmentation. Maybe I am wrong, but I still have question.

 The source code notify the user's callback LWS_XXX_CLIENT_WRITEABLE event
 by POLLOUT event (client.c:665)
 I remember POLLOUT event will be toggled when the socket's buffer has free
 space even one byte left, not when the socket's buffer is empty.

 For example, if user sends 4K bytes data first time, it's ok, the data
 will be pushed to socket's SNDBUFFER, after 3K bytes sent, user will get
 WRITABLE signal because of socket buffer has 1K left, then user will send
 next 4K bytes, but buffer has only 1K left, so "send" function will return
 The data is not sent totally.

Ticket URL: <http://libwebsockets.org/trac/ticket/40#comment:7>
libwebsockets <http://libwebsockets.org>
libwebsockets C library

More information about the Libwebsockets mailing list