summaryrefslogtreecommitdiff
path: root/main/WebSocket.hs
diff options
context:
space:
mode:
Diffstat (limited to 'main/WebSocket.hs')
-rw-r--r--main/WebSocket.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/WebSocket.hs b/main/WebSocket.hs
index 5c49aa1..7a957e2 100644
--- a/main/WebSocket.hs
+++ b/main/WebSocket.hs
@@ -27,8 +27,10 @@ instance Show WebSocketAddress where
show (WebSocketAddress _ _) = "websocket"
instance PeerAddressType WebSocketAddress where
- sendBytesToAddress (WebSocketAddress _ conn) msg = do
- WS.sendDataMessage conn $ WS.Binary $ BL.fromStrict msg
+ sendBytesToAddress (WebSocketAddress _ conn) msg = do
+ WS.sendDataMessage conn $ WS.Binary $ BL.fromStrict msg
+ connectionToAddressClosed (WebSocketAddress _ conn) = do
+ WS.sendClose conn BL.empty
startWebsocketServer :: Server -> String -> Int -> (String -> IO ()) -> IO ()
startWebsocketServer server addr port logd = do