Closing a WebSocket in Functional Programming

Why isn't Socket.makeWebSocket scoped like Http Requests? I see that Socket.fromWebSocket closes the scope somehow on the acquire method, but how does one close a websocket then?
Was this page helpful?