Re: websockets server example won't compile: type mismatch:

2017-12-17 Thread mashingan
The server example with newest push is working ok, (that `waitFor server.serve(cb, Port 8080)` line). For the client, when you tested with the server example, it worked but not with `echo.websocket.org` because of empty bytes returned from echo server. This is interesting question regarding

Re: websockets server example won't compile: type mismatch:

2017-12-15 Thread grazil
I have no problem to compile the server example, but i have not change the last line: waitFor server.serve(Port(8080), cb) Could it be the reason of your error ?

Re: websockets server example won't compile: type mismatch:

2017-12-13 Thread luked2
For the benefit of anyone who lands here - the global variable needed to be thread-local. Arguably there ought to be a better way of maintaining the not-really-global-state. Next problem - the code in the client misses out the last "rn" from the initial HTTP GET request, in client.nim, so

websockets server example won't compile: type mismatch:

2017-12-09 Thread luked2
I'm trying to compile the websockets example. But it fails to compile. [https://github.com/niv/websocket.nim/blob/master/websocket/server.nim](https://github.com/niv/websocket.nim/blob/master/websocket/server.nim) Compiling that example code (after adding a call to server.serve(cb) at the end)