* [Buildroot] Shutting down a websocket
@ 2013-07-02 12:18 Graham Newton
2013-07-02 13:46 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Graham Newton @ 2013-07-02 12:18 UTC (permalink / raw)
To: buildroot
I have a websocket application that communicates with another server via
a standard socket. What I would like to do is shutdown the websocket
cleanly in the event of the standard socket shutting down.
At present if I detect the standard socket shutting down I flag the
event and call libwebsocket_callback_on_writable. At the start of the
processing of LWS_CALLBACK_SERVER_WRITEABLE I test the flag and return
-1 to shutdown the websocket like so:
case LWS_CALLBACK_SERVER_WRITEABLE:
{
if( pss->shutdown ){ // pss is a pointer to websocket
specific user data
return -1; // Shutdown websocket
}
...
However this appears to causes problems in that later I get an assert in
insert_wsi_socket_into_fds at assert(wsi->sock); which appears to
suggest that the socket has been shutdown but the websocket object is
still being serviced.
Am I shutting down the websocket in the correct manner?
Thanks
Graham
--
Graham Newton
Senior Software Engineer
------------------------------------------------------------------------
Peavey Digital Research
A Division of Peavey Electronics Corporation
Phone +44 1865 734397
Direct +44 1865 734397
Email gnewton at peavey-eu.com
Web www.peaveycommercialaudio.com
<http://www.peaveycommercialaudio.com> - mm.peavey.com
<http://mm.peavey.com> - www.crestaudio.com <http://www.crestaudio.com>
- aa.peavey.com <http://aa.peavey.com> - www.peaveyoxford.com
<http://www.peaveyoxford.com>
*PEAVEY COMMERCIAL AUDIO* - Great Folds Road, Corby, Northamptonshire,
NN18 9ET UK
*PEAVEY DIGITAL RESEARCH* - 6 Elm Place, Eynsham, Oxfordshire OX29 4BD UK
*PEAVEY ITALIA* - Via P.La Torre 21, Zona Ind.le Cerretano, 60022
Castelfidardo An, Italy
*PEAVEY CHINA* - 1F Taiping Yaoye, 3 Gongye Wu Lu, Shekou, Shenzhen
China 518067
*PEAVEY ELECTRONICS CORPORATION* - 5022 Hartley Peavey Drive, Meridian,
MS 39305 USA
Peavey Electronics Limited is a registered company in England & Wales,
Company Registration No.: 01249126
Registered office: GREAT FOLDS ROAD OAKLEY HAY CORBY NORTHAMPTONSHIRE.
NN18 9ET
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130702/55fbe0d9/attachment.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] Shutting down a websocket
2013-07-02 12:18 [Buildroot] Shutting down a websocket Graham Newton
@ 2013-07-02 13:46 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-07-02 13:46 UTC (permalink / raw)
To: buildroot
Dear Graham Newton,
On Tue, 02 Jul 2013 13:18:04 +0100, Graham Newton wrote:
> Am I shutting down the websocket in the correct manner?
Hm, am I confused. What makes you think this question is related to
Buildroot? Don't you think it would be better to ask such a question on
a mailing list dedicated to websocket related development?
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-02 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-02 12:18 [Buildroot] Shutting down a websocket Graham Newton
2013-07-02 13:46 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.