gateway

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseHandler

type CloseHandler func(c Conn)

type Conn

type Conn interface {
	ConnID() uint64
	ClientIP() string
	Push(m *rony.MessageEnvelope)
	Pop() *rony.MessageEnvelope
	SendBinary(streamID int64, data []byte) error
	Persistent() bool
	Get(key string) interface{}
	Set(key string, val interface{})
}

Conn defines the Connection interface

type ConnectHandler

type ConnectHandler func(c Conn, kvs ...KeyValue)

type Gateway

type Gateway interface {
	Start()
	Run()
	Shutdown()
	GetConn(connID uint64) Conn
	Addr() []string
}

Gateway defines the gateway interface where clients could connect and communicate with the edge server

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type MessageHandler

type MessageHandler func(c Conn, streamID int64, data []byte)

type Protocol

type Protocol string
const (
	Undefined Protocol = ""
	TCP       Protocol = "tcp"
	Dummy     Protocol = "dummy"
)

Directories

Path Synopsis
tcp
util
Package wsutil provides utilities for working with WebSocket protocol.
Package wsutil provides utilities for working with WebSocket protocol.

Jump to

Keyboard shortcuts

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