JuliaWeb / WebSockets.jl

A WebSockets library for Julia
MIT License
158 stars 57 forks source link

Failed to open a websocket server path #154

Closed woshidama323 closed 3 years ago

woshidama323 commented 4 years ago

Env ubuntu18.4 Julia 1.2

Question: When using websocket like this below I got an error

> WebSockets.open((-)->nothing,"ws://localhost:9050/ws")
> HTTP.Messages.Response:
> """
> HTTP/1.1 404 Not Found
> Content-Type: text/plain; charset=utf-8
> X-Content-Type-Options: nosniff
> Date: Thu, 28 Nov 2019 08:01:34 GMT
> Content-Length: 19

But the websocket server is ok and I can access this server by using command ws ws "ws://localhost:9050/ws"

So, what's the reason ?

hustf commented 4 years ago

I would have to look up the 404 message. Perhaps you actually do connect. But since you immediately exit and close, which http response would you actually expect?

woshidama323 commented 4 years ago

@hustf I need to keep the ws connection alive always and can read the message from the ws server continually. You mean client had already connected to the ws server ? I will test it again