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

Trac trac at libwebsockets.org
Sun Sep 22 07:38:26 CEST 2013

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

Comment (by agreen):

 It's maybe not as complex as you think.

 When the connection is established and the protocol known, the socket
 options for the connection are changed to reserve protocol.rx_buffer_size
 space for transmit packets.

 So it's safe to assume that if you get signalled it's OK to write on that
 socket, that you can write up to protocol.rx_buffer_size on it (defaults
 to 4096 if left at 0).  If you know your messages will be smaller than
 that limit, as in the test app case, you'll never have a problem.

 If you want to write more in one sitting, for example you have a huge
 multi-megabyte message, you need to use websockets message fragmentation
 (see the fraggle test app).

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

More information about the Libwebsockets mailing list