0

I cant find any method that would allow me to close the connection from the server side after receiving the frist message, as far as I can tell you can only deny the connection at the beginning with on_accept and determine why the other side closed it with on_close (from the IF_APC_WSP_EXTENSION interface).

I searched the APC classes but didn't find anything usefull so far.

Question: If there isn't any predefiend method to close the connection from the server side, how can I access the current WebSocket and close it ?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

1 Answers1

0

Why do you want to close the connection from the server side? I can't think of too many scenarios when you would want to do this.

The connection to the websocket is initiated by the client, so the client is also responsible with closing it (except maybe in some extreme scenarios like, for example, the application server runs low on resources and closes websocket connections to free some).

For more details on how to close a websocket from the client side, have a look at this thread.

Cheers, SePo

Community
  • 1
  • 1
sepo
  • 394
  • 1
  • 8