cs

package
v0.0.0-...-4b52c34 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Fw = &Forwarder{
		container: make(map[string]*UserConnForward),
	}
)

Functions

This section is empty.

Types

type Client

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

func Connect

func Connect(url url.URL) (*Client, error)

func (Client) Close

func (c Client) Close()

func (Client) LocalPort

func (c Client) LocalPort(serverExportPort int32) (int32, bool)

func (*Client) MountBinaryHandler

func (c *Client) MountBinaryHandler(f OnBinary)

func (Client) Over

func (c Client) Over(err error)

func (*Client) Ports

func (c *Client) Ports() map[int32]int32

func (*Client) SetPorts

func (c *Client) SetPorts(ports map[int32]int32)

func (Client) StartReadMessage

func (c Client) StartReadMessage()

func (Client) Write

func (c Client) Write(userConnectId string, bytes []byte) error

type Forwarder

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

func (*Forwarder) ToLocal

func (f *Forwarder) ToLocal(message *protocol.BurstMessage)

type OnBinary

type OnBinary func([]byte, *Client)

type OnText

type OnText func(string, *Client)

type UserConnForward

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

func NewUserConn

func NewUserConn(localPort int32, userConnectId string) (*UserConnForward, error)

func (UserConnForward) StartForwardToServer

func (u UserConnForward) StartForwardToServer(client *Client)

Jump to

Keyboard shortcuts

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