Types
Message = object kind*: MessageKind data*: string
- Source Edit
MessageKind = enum TextMessage, BinaryMessage, Ping, Pong
- Source Edit
Procs
proc newWebSocket(url: string): WebSocket {....raises: [CatchableError, ValueError, HttpRequestError, LibraryError, Exception, OSError, SslError, IOError, TimeoutError, ProtocolError, KeyError], tags: [RootEffect, ReadIOEffect, WriteIOEffect, TimeEffect], forbids: [].}
- Opens a new WebSocket connection. Source Edit
proc receiveMessage(ws: WebSocket; timeout = -1): Option[Message] {....gcsafe, raises: [CatchableError, OSError, SslError, TimeoutError], tags: [ReadIOEffect, TimeEffect], forbids: [].}
- Source Edit