Documentation ¶
Index ¶
Constants ¶
View Source
const ( PongWait = 5 * time.Second MaxMessageSize = 1024 WriteWait = 5 * time.Second PingPeriod = 100 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func MessageDown ¶
Types ¶
type Connection ¶
type Connection interface { // Write writes the contents of a byte array to the connection. It is safe for multiple threads to call Write simultaneously. Write blocks until either the message is sent or the connection is closed. Write([]byte) // Read reads the next message from a connection. It will block until either a message becomes available or the connection is closed. Read() ([]byte, error) // Close terminates a connection. Close() error }
Connection provides a simple, generalized interface for networked connections in which there can be one reader and many writers. All connection errors are propagated through subsequent calls; that is, if any method invocation returns an error, all subsequent invocations of any method will also return the same error.
func Websocket ¶
func Websocket(conn *websocket.Conn) Connection
type WebsocketConnection ¶
type WebsocketConnection struct {
// contains filtered or unexported fields
}
func (*WebsocketConnection) Close ¶
func (c *WebsocketConnection) Close() error
func (*WebsocketConnection) Read ¶
func (c *WebsocketConnection) Read() ([]byte, error)
func (*WebsocketConnection) Write ¶
func (c *WebsocketConnection) Write(message []byte)
Directories ¶
Path | Synopsis |
---|---|
builders implements a pool of flatbuffers Builders and prevents data leaks in pool members.
|
builders implements a pool of flatbuffers Builders and prevents data leaks in pool members. |
Click to show internal directories.
Click to hide internal directories.