Documentation
¶
Index ¶
Constants ¶
View Source
const ( TextMessage = 1 CloseMessage = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(conn net.Conn) *Connection
func Upgrade ¶
func Upgrade(w http.ResponseWriter, r *http.Request) (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes the underlying connection without a close frame
func (*Connection) Read ¶
func (c *Connection) Read() ([]byte, error)
func (*Connection) Write ¶
func (c *Connection) Write(messageType MessageType, message []byte) error
type MessageType ¶
type MessageType int
Click to show internal directories.
Click to hide internal directories.