common

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BufferSize = 1024 * 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RedirectRequest

type RedirectRequest struct {
	Source     int32
	TargetHost string
	TargetPort int32
}

func ParsePorts

func ParsePorts(s string) (*RedirectRequest, error)

type Session

type Session struct {
	Id      uuid.UUID
	Conn    net.Conn
	Buf     bytes.Buffer
	Context context.Context

	Open bool
	sync.Mutex
	// contains filtered or unexported fields
}

func GetSession

func GetSession(id uuid.UUID) (*Session, bool)

func NewSession

func NewSession(conn net.Conn) *Session

func NewSessionFromStream

func NewSessionFromStream(id uuid.UUID, conn net.Conn) *Session

func (*Session) Close

func (s *Session) Close()

Jump to

Keyboard shortcuts

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