You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a websocket server using the example provided in the README. The service dictionary send to the websocket_example function does not contain a key :socket. The socket is being created I can see it running on my system processes but I am not able to access it to read and write.
MK
The text was updated successfully, but these errors were encountered:
function websocket_service(x)
# No key :socket found in x !
println(x)
sock = x[:socket]
while !eof(sock)
str = String(read(sock))
println("Received data: " * str)
json = JSON.parse(str)
# Call to POWERED II Model with Json Observations
write(sock, "Here are the predictions" * str)
end
end
WebSocket server
@app w = (
Mux.wdefaults,
route("/ws_io", websocket_service),
Mux.wclose,
Mux.notfound());
The README.md contains a complete example of how to do this, but I suppose it could be clearer that Mux (WebSockets.jl) expect a regular HTTP server and a WS server.
Please feel free to make a PR changing the README if you think it helps :)
Hi,
I am creating a websocket server using the example provided in the README. The service dictionary send to the websocket_example function does not contain a key :socket. The socket is being created I can see it running on my system processes but I am not able to access it to read and write.
MK
The text was updated successfully, but these errors were encountered: