No description
Find a file
2017-03-25 22:06:06 +01:00
docs update readme and docs following pr 2017-03-25 22:03:54 +01:00
examples Many style fixes and addition of missing procedures/fields. 2017-03-25 15:24:50 +01:00
src Fix newWebSocket with a protocol param 2017-03-25 16:17:21 +01:00
templates tiny change in docs 2017-03-11 20:43:08 +01:00
.gitignore Initial commit 2017-03-01 16:48:11 +01:00
jswebsockets.nimble bump version 2017-03-25 22:06:06 +01:00
LICENSE first push, mostly works 2017-03-01 16:51:34 +01:00
README.md update readme and docs following pr 2017-03-25 22:03:54 +01:00

JsWebsockets

Beginning of a wrapper for websockets, for the javascript backend of nim

Examples

Generated Docs

import jswebsockets

var
  socket = newWebSocket("ws://echo.websocket.org/")

socket.onOpen = proc (e:Event) =
  echo("sent: test")
  socket.send("test")
socket.onMessage = proc (e:MessageEvent) =
  echo("received: ",e.data)
  socket.close(StatusCode(1000),"received msg")
socket.onClose = proc (e:CloseEvent) =
  echo("closing: ",e.reason)