Documentation

Overview

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

    Index

    Constants

    View Source
    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;"
    )

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Connection

    type Connection struct {
    	at.ContextAware
    	websocket.Connection
    }

      Connection is the websocket connection

      type Handler

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

        Handler is the interface the websocket handler

        type Register

        type Register func(handler Handler, conn *Connection)

          Register is the handler register

          type Server

          type Server struct {
          	*websocket.Server
          }

          Directories

          Path Synopsis
          Package websocket provides rich websocket support for the iris web framework.
          Package websocket provides rich websocket support for the iris web framework.