hiboot: hidevops.io/hiboot/pkg/starter/websocket Index | Files

package websocket

import "hidevops.io/hiboot/pkg/starter/websocket"

Package websocket provides web socket auto configuration for web/cli application

Index

Package Files

autoconfigure.go connection.go handler.go properties.go

Constants

const (
    // Profile websocket profile name
    Profile = "websocket"
    // All is the string which the Emitter use to send a message to all.
    All = ""
    // Broadcast is the string which the Emitter use to send a message to all except this connection.
    Broadcast = ";to;all;except;me;"
)

type Connection Uses

type Connection struct {
    at.ContextAware
    websocket.Connection
}

Connection is the websocket connection

type Handler Uses

type Handler interface {
    OnMessage(data []byte)
    OnDisconnect()
    OnPing()
    OnPong()
}

Handler is the interface the websocket handler

type Register Uses

type Register func(handler Handler, conn *Connection)

Register is the handler register

type Server Uses

type Server struct {
    *websocket.Server
}

Package websocket imports 6 packages (graph). Updated 2019-10-06. Refresh now. Tools for package owners.