portfwdserver

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServerRW

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

func (*GRPCServerRW) Close

func (g *GRPCServerRW) Close() error

func (*GRPCServerRW) CloseRead

func (g *GRPCServerRW) CloseRead() error

CloseRead is called once the host stops sending, which happens both when it shuts down its write side and when it closes the connection outright. Both reach us as io.EOF from stream.Recv, and only the latter also cancels the stream context. Ending the tunnel here would therefore turn every half-close into a full close and discard the response the host is still waiting for. The proxy shuts down the write side of the guest connection by itself, so there is nothing left to do: the tunnel lives on until the guest service closes (CloseWrite) or the host cancels the stream (Close).

func (*GRPCServerRW) CloseWrite

func (g *GRPCServerRW) CloseWrite() error

CloseWrite is called once the guest service closes its side. The tunnel protocol cannot signal a half-close towards the host, so this ends the whole tunnel; the host then sees the stream end and shuts down the write side of its own connection.

func (*GRPCServerRW) LocalAddr

func (g *GRPCServerRW) LocalAddr() net.Addr

func (*GRPCServerRW) Read

func (g *GRPCServerRW) Read(p []byte) (n int, err error)

func (*GRPCServerRW) RemoteAddr

func (g *GRPCServerRW) RemoteAddr() net.Addr

func (*GRPCServerRW) SetDeadline

func (g *GRPCServerRW) SetDeadline(_ time.Time) error

func (*GRPCServerRW) SetReadDeadline

func (g *GRPCServerRW) SetReadDeadline(_ time.Time) error

func (*GRPCServerRW) SetWriteDeadline

func (g *GRPCServerRW) SetWriteDeadline(_ time.Time) error

func (*GRPCServerRW) Write

func (g *GRPCServerRW) Write(p []byte) (n int, err error)

type TunnelServer

type TunnelServer struct{}

func NewTunnelServer

func NewTunnelServer() *TunnelServer

func (*TunnelServer) Start

Jump to

Keyboard shortcuts

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