mock

package
v0.0.0-...-69995ca Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 17 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

NewCmd NewCmd

func NewServerCmd

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

NewCmd NewCmd

Types

type ClientDemo

type ClientDemo struct {
}

ClientDemo Client demo

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 {
}

ServerHandler ServerHandler

func (*ServerHandler) Accept

func (h *ServerHandler) Accept(conn kim.Conn, timeout time.Duration) (string, kim.Meta, error)

Accept this connection

func (*ServerHandler) Disconnect

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

Disconnect default listener

func (*ServerHandler) Receive

func (h *ServerHandler) Receive(ag kim.Agent, payload []byte)

Receive default listener

type StartOptions

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

StartOptions StartOptions

type TCPDialer

type TCPDialer struct {
}

TCPDialer TCPDialer

func (*TCPDialer) DialAndHandshake

func (d *TCPDialer) DialAndHandshake(ctx kim.DialerContext) (net.Conn, error)

DialAndHandshake DialAndHandshake

type WebsocketDialer

type WebsocketDialer struct {
}

WebsocketDialer WebsocketDialer

func (*WebsocketDialer) DialAndHandshake

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

DialAndHandshake DialAndHandshake

Jump to

Keyboard shortcuts

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