dummyGateway

package
v0.6.15 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Exposer func(gw *Gateway)
}

type Conn

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

func (*Conn) ClientIP

func (c *Conn) ClientIP() string

func (*Conn) ConnID

func (c *Conn) ConnID() uint64

func (*Conn) Get

func (c *Conn) Get(key string) interface{}

func (*Conn) Persistent

func (c *Conn) Persistent() bool

func (*Conn) SendBinary

func (c *Conn) SendBinary(streamID int64, data []byte) error

func (*Conn) Set

func (c *Conn) Set(key string, val interface{})

func (*Conn) SetPersistent

func (c *Conn) SetPersistent(b bool)

type Gateway

type Gateway struct {
	gateway.ConnectHandler
	gateway.MessageHandler
	gateway.CloseHandler
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Gateway, error)

func (*Gateway) Addr

func (g *Gateway) Addr() []string

func (*Gateway) CloseConn

func (g *Gateway) CloseConn(connID uint64)

func (*Gateway) GetConn

func (g *Gateway) GetConn(connID uint64) rony.Conn

func (*Gateway) OpenConn

func (g *Gateway) OpenConn(connID uint64, onReceiveMessage func(connID uint64, streamID int64, data []byte), kvs ...*rony.KeyValue)

func (*Gateway) Run

func (g *Gateway) Run()

func (*Gateway) SendToConn

func (g *Gateway) SendToConn(connID uint64, streamID int64, data []byte)

func (*Gateway) Shutdown

func (g *Gateway) Shutdown()

func (*Gateway) Start

func (g *Gateway) Start()

Jump to

Keyboard shortcuts

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