How to close the WebSocket?

The process of closing a WebSocket connection in an API depends on the programming language and the WebSocket library you are using. Here is a quick look at how it works in a few common environments-

1. ShoonyaAPI-jssocket.close(); // Optional: socket.close(code, reason);

2. ShoonyaApi-pywebsocket.close(code=1000, reason=”Normal closure”)

For more details, you can check this- https://github.com/Shoonya-Dev

Still Have Doubts? Talk to Us

If your question wasn’t answered above, we’re here for you. Reach out to our team for assistance.

Chat with us

Got questions? Get answers instantly

Contact us

Reach out to our customer care team for quick assistance

Customer Support