# Packages
Package jsonwstesting defines helpers to test web sockets.
# Functions
DefaultBasicMsgAllocator is the default function that allocates a message type before unmarshalling it.
NewBasic creates a new basic web socket server.
NewBufferedConn creates a new buffered connection from a pingable connection.
NewHub creates a new hub.
# Constants
DefaultWebSocketMaxMsgSize is the default maximum size of a web socke received message in in bytes.
DefaultWebSocketPingInterval is the default interval between web socket pings.
DefaultWebSocketPongTimeout is the default timeout of a web socket expected pong.
DefaultWebSocketReadBufferSize is the default size of the web socket read buffer in bytes.
DefaultWebSocketWriteBufferSize is the default size of the web socket write buffer in bytes.
DefaultWebSocketWriteChanSize is the default size of a web socket buffered connection channel.
DefaultWebSocketWriteTimeout is the default timeout of a web socket write.
# Structs
Basic implements basic web socket server meant to be used in conjunction with an HTTP server.
BasicConfig contains options for a basic web socket server.
BasicConnMsg contains a connection and a message read from that connection.
BufferedConn wraps a connection so that writes are buffered and not blocking unless the channel is full.
BufferedConnConfig contains options for a buffered connection.
GorrilaConn implements github.com/stratumn/go-core/jsonws/Conn using a Gorrila web socket connection.
Hub manages a list of web socket connections.
Message is a web socket message.
# Interfaces
Conn must be implemented by a web socket connection.
PingableConn must be able to send a ping control message.
Writer must be able to write JSON messages.
# Type aliases
BasicMsgAllocator is a function that must initialize a message type before it is unmarshallied.
UpgradeHandle is a function that upgrades an HTTP connection to a web socket connection.