niv / websocket.nim

websockets for nim
http://niv.github.io/websocket.nim/docs/0.1.1/websocket.html
Other
101 stars 25 forks source link

Example client doesn't compile #31

Closed gradha closed 6 years ago

gradha commented 6 years ago

The example at http://niv.github.io/websocket.nim/docs/0.1.1/websocket/client.html is missing a very important first line import websocket/client. After adding this line, Nim 0.18.0 still won't compile it:

/Users/gradha/.nimble/pkgs/websocket-0.2.1/websocket/shared.nim(87, 49) template/generic instantiation from here
/Users/gradha/.nimble/pkgs/websocket-0.2.1/websocket/shared.nim(130, 14) Error: type mismatch: got <byte> but expected 'int'

I see the git repository is at 0.2.3, so I tried with #head but then there is a missing symbol:

/Users/gradha/.nimble/pkgs/websocket-#head/websocket/client.nim(47, 30) template/generic instantiation from here
/Users/gradha/.nimble/pkgs/websocket-#head/websocket/client.nim(46, 23) Error: undeclared identifier: 'newContext'
Araq commented 6 years ago

Welcome back. Compiling with -d:ssl (soon the default) should fix that.

dom96 commented 6 years ago

websockets really shouldn't depend on ssl.

metagn commented 6 years ago

Docs are outdated, but the -d:ssl issue is fixed now