close add api to control sent close frame contents
authorAndy Green <andy.green@linaro.org>
Sat, 26 Dec 2015 09:20:34 +0000 (17:20 +0800)
committerAndy Green <andy.green@linaro.org>
Sat, 26 Dec 2015 09:20:34 +0000 (17:20 +0800)
commit1fb95e8084bc7b27e72bf199ba422efdfbee360b
treee2405ad4e0641181056ef2e8dd250b9b8f061c4d
parent066a7a1801102e8dbebc3cf51bba82a83bf15e88
close add api to control sent close frame contents

This adds an api lws_close_reason() which lets you control what will
be sent in the close frame when the connection is closed by returning
nonzero from the user callback.

The test server demo is extended to prove it works in both directions.

With this, we should have nice close support.

https://github.com/warmcat/libwebsockets/issues/196

Signed-off-by: Andy Green <andy.green@linaro.org>
changelog
lib/client-parser.c
lib/libwebsockets.c
lib/libwebsockets.h
lib/output.c
lib/private-libwebsockets.h
test-server/test-server-dumb-increment.c
test-server/test.html