mock

package
v0.0.0-...-93c743e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientCmd

func NewClientCmd(ctx context.Context) *cobra.Command

func NewServerCmd

func NewServerCmd(ctx context.Context) *cobra.Command

func NewServerHandler

func NewServerHandler() him.Handler

Types

type ClientDemo

type ClientDemo struct {
}

func (*ClientDemo) Start

func (c *ClientDemo) Start(userID, protocol, addr string)

type ServerDemo

type ServerDemo struct{}

func (*ServerDemo) Start

func (s *ServerDemo) Start(id, protocol, addr string)

type ServerHandler

type ServerHandler struct {
}

func (*ServerHandler) Accept

func (s *ServerHandler) Accept(conn him.Conn, timeout time.Duration) (string, error)

Accept this connection

func (*ServerHandler) Disconnect

func (s *ServerHandler) Disconnect(id string) error

Disconnect disconnects this connection

func (*ServerHandler) Receive

func (s *ServerHandler) Receive(agent him.Agent, payload []byte)

Receive default Listener

type StartOptions

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

type WebsocketDialer

type WebsocketDialer struct {
}

WebsocketDialer WebsocketDialer

func (*WebsocketDialer) DialAndHandshake

func (d *WebsocketDialer) DialAndHandshake(ctx him.DialerContext) (net.Conn, error)

DialAndHandshake DialAndHandshake

Jump to

Keyboard shortcuts

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