Aohan has not published any posts yet.

The OnPostServer() method of your WebSocket class should be triggered when the WebSocket closes, provided that you return from the Server() method when that happens.

I see. In asynchronous mode, you do have to call EndServer() explicitly to get the OnPostServer() method to execute. This means that you'll have to handle the client closure within your class. One way to do that is to have the client send a special message shortly before closing to indicate that a disconnect is about to happen. You can then handle that message in your WebSocket server class. Another way is to do a Read() and handle the case where $$$CSPWebSocketClosed is returned.

Aohan has no followers yet.
Aohan has not followed anybody yet.
Global Masters badges:
Aohan has no Global Masters badges yet.