[Libwebsockets] [libwebsockets] #37: Close client connection from server

Trac trac at libwebsockets.org
Wed Sep 18 02:45:35 CEST 2013

#37: Close client connection from server
  Reporter:  uvaraj421               |      Owner:  agreen
      Type:  defect                  |     Status:  new
  Priority:  major                   |  Milestone:
 Component:  libwebsocket test apps  |    Version:
Resolution:                          |   Keywords:

Comment (by agreen):

 It's the same situation, you need to close by returning -1 from the
 callback with that connection context.

 You can provoke that situation easily by just using
 libwebsocket_callback_on_writable() on the connection you intend to close,
 and in LWS_CALLBACK_SERVER_WRITEABLE check if this is a connection you
 want to close... if so just return -1.

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

More information about the Libwebsockets mailing list