server

package
v0.0.0-...-78a6345 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPacket

func NewPacket(rw io.ReadWriter) *packet

Types

type ClientConnOptions

type ClientConnOptions struct {
	WriteChannelSize int
}

type ConnectionContext

type ConnectionContext struct {
	context.Context
}

func (*ConnectionContext) Close

func (ctx *ConnectionContext) Close() error

type Server

type Server struct {
	*TCPServer
	*WebsocketServer
}

type TCPServer

type TCPServer struct {
	OnAuthorization func()
	OnClose         func()
	// contains filtered or unexported fields
}

func NewTCPServer

func NewTCPServer(config configs.TCPConfig) *TCPServer

func (*TCPServer) Close

func (s *TCPServer) Close() error

func (*TCPServer) Run

func (s *TCPServer) Run() error

type WebsocketServer

type WebsocketServer struct {
	// contains filtered or unexported fields
}

func NewWebsocketServer

func NewWebsocketServer(timeout time.Duration) *WebsocketServer

func (*WebsocketServer) ServeHTTP

func (s *WebsocketServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL