[Libwebsockets] client exit status reg.

Andy Green andy at warmcat.com
Tue Mar 4 10:57:38 CET 2014



On 4 March 2014 17:23:36 GMT+08:00, sasidhar <sasidhar.samayamantula at raybiztech.com> wrote:
>HI, 
>
>Thanks for your valuable suggestions, currently in my server code,
>server can send data to client when client send any data, 
>
>In server : 
>
>case LWS_CALLBACK_RECEIVE: 
>libwebsocket_callback_on_writable(context, wsi); 
>case LWS_CALLBACK_SERVER_WRITEABLE: 
>libwebsocket_write(wsi, p, n, LWS_WRITE_TEXT); 
>
>In my code, server i can send data to particular client, only when
>LWS_CALLBACK_RECEIVE is called (when client sends any data). But i need
>a requirement that server should send data to a particular client
>(among few clients) at any instant of time when it needs.Is there any
>chance to achieve this, please provide your valuable suggestions. 

How does your code learn that it needs to send data on a connection?

Via something coming in on a socket?  Something else?

-Andy


>Thanks & Regards, 
>Sasidhar 
>
>
>
>
>Thanks & Regards, 
>S.Sasidhar. 
>
>
>----- Original Message -----
>
>From: "Andy Green (林安廸)" <andy at warmcat.com> 
>To: "sasidhar" <sasidhar.samayamantula at raybiztech.com>,
>libwebsockets at ml.libwebsockets.org 
>Sent: Tuesday, March 4, 2014 2:20:12 PM 
>Subject: Re: [Libwebsockets] client exit status reg. 
>
>On 04/03/14 15:45, the mail apparently from sasidhar included: 
>> Hi, 
>> 
>> I am developing a server and multiple client based application using 
>> libwebsockets in C . Where in server i am getting the client info 
>> when a new client is connected by using the call 
>> libwebsockets_get_peer_addresses(); But, when any client is 
>> disconnected i am not getting any info to the server? Please give 
>> your valuable suggestions to achieve this. 
>
>Sorry the issue is when the client disconnects, you don't get the CLOSE
>
>callback? 
>
>-Andy 
>
>> 
>> 
>> 
>> Thanks & Regards, S.Sasidhar. 
>> 
>> 
>> 
>> 
>> _______________________________________________ Libwebsockets mailing
>
>> list Libwebsockets at ml.libwebsockets.org 
>> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets 
>> 




More information about the Libwebsockets mailing list