Waldemar Lima Well-Known Member Licensed User Aug 9, 2018 #1 Hi everyone ! i am learning about JServer Library [ WebSocket ] . so i have a doubt about WebSocket Handle . When connected user is "Disconnected" , session will be deleted automatically ? ( if not , how can i destroy this session ? )
Hi everyone ! i am learning about JServer Library [ WebSocket ] . so i have a doubt about WebSocket Handle . When connected user is "Disconnected" , session will be deleted automatically ? ( if not , how can i destroy this session ? )
LucaMs Expert Licensed User Longtime User Aug 9, 2018 #2 When the websocket is disconnected... is disconnected, therefore the session is closed. If you are asking about the websocket handler class instance it will be automatically destroyed if there are no references to it. Upvote 0
When the websocket is disconnected... is disconnected, therefore the session is closed. If you are asking about the websocket handler class instance it will be automatically destroyed if there are no references to it.
Erel B4X founder Staff member Licensed User Longtime User Aug 9, 2018 #3 No. The session is not deleted when the user disconnects. The session is deleted when you call Session.Invalidate. You can also set Session.MaxInactiveInterval. This way the session will be deleted automatically when it is no longer active. Upvote 0
No. The session is not deleted when the user disconnects. The session is deleted when you call Session.Invalidate. You can also set Session.MaxInactiveInterval. This way the session will be deleted automatically when it is no longer active.
LucaMs Expert Licensed User Longtime User Aug 10, 2018 #6 I still have to understand the Erel's answer (but I trust, of course). Or, better, I understand his answer but I don't know what you can do with a session if the websocket is disconnected. Last edited: Aug 10, 2018 Upvote 0
I still have to understand the Erel's answer (but I trust, of course). Or, better, I understand his answer but I don't know what you can do with a session if the websocket is disconnected.
Erel B4X founder Staff member Licensed User Longtime User Aug 10, 2018 #7 LucaMs said: Or, better, I understand his answer but I don't know what you can do with a session if the websocket is disconnected. Click to expand... Very simple. The user might reconnect again. Sessions are especially useful with regular http requests as they allow you to maintain the state. Upvote 0
LucaMs said: Or, better, I understand his answer but I don't know what you can do with a session if the websocket is disconnected. Click to expand... Very simple. The user might reconnect again. Sessions are especially useful with regular http requests as they allow you to maintain the state.
LucaMs Expert Licensed User Longtime User Aug 10, 2018 #8 Erel said: Very simple. The user might reconnect again. Click to expand... I will open a new thread, don't worry Then "I" have to discover if and which events will be raised, in this case. Upvote 0
Erel said: Very simple. The user might reconnect again. Click to expand... I will open a new thread, don't worry Then "I" have to discover if and which events will be raised, in this case.