Hi Manu,

If the websocket client has not being authenticated, the websocket server
needs to close the connection. Something like below:


<%
var user = session.get('user');

webSocket.onopen = function () {
var user = session.get('user');

if (user == null) {
this.close();
}
};

%>

thanks,
Dilini

On Mon, Aug 29, 2016 at 2:01 PM, Udara Rathnayake <uda...@wso2.com> wrote:

> what we can do right now is ask client to close the connection from the
> server, which is not feasible for CEP guys as I heard.
>
> @dilini can explain the full use case.
>
> On Mon, Aug 29, 2016 at 1:49 PM, Nipuna Chandradasa <nipu...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> There is a requirement to close the WebSocket connection from server
>> side. Currently there is no close() functionality available for WebSocket
>> from the jaggery side.
>>
>> 1. Is there a reason to why didn't we implement this in the first place?
>> 2. Is there any other way of terminating a web socket connection?
>>
>> Thank you,
>>
>> --
>> Nipuna Marcus
>> *Software Engineer*
>> WSO2 Inc.
>> http://wso2.com/ - "lean . enterprise . middleware"
>> Mobile : +94 (0) 713 667906
>> nipu...@wso2.com
>>
>
>
>
> --
> Regards,
> UdaraR
>



-- 
*Dilini Muthumala*
Senior Software Engineer,
WSO2 Inc.

*E-mail :* dil...@wso2.com
*Mobile: *+94 713-400-029
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to