tcp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tcp implements TCP protocol support for the tunnel library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

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

Protocol implements TCP protocol forwarding.

func New

func New() *Protocol

New creates a new TCP protocol handler.

func (*Protocol) Dial

func (p *Protocol) Dial(ctx context.Context, addr string) (net.Conn, error)

Dial connects to a TCP address.

func (*Protocol) Forwarder

func (p *Protocol) Forwarder() forward.Forwarder

Forwarder returns the TCP forwarder.

func (*Protocol) Listen

func (p *Protocol) Listen(addr string) (net.Listener, error)

Listen creates a TCP listener on the specified address.

func (*Protocol) Name

func (p *Protocol) Name() string

Name returns the protocol name.

Jump to

Keyboard shortcuts

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