niaucchi3

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrProtocolFail = errors.New("niaucchi3: nonsensical network messages")

ErrProtocolFail means a fatal protocol violation.

View Source
var ErrTablesFull = errors.New("niaucchi3: internal tables in Context are full")

ErrTablesFull means the internal tables used in the Context are full.

View Source
var ErrTimeout = errors.New("niaucchi3: timed out")

ErrTimeout indicates a timeout error.

Functions

This section is empty.

Types

type Context

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

Context represents a connection used to tunnel sockets.

func NewContext

func NewContext(isClient bool, conn net.Conn) (ctx *Context)

NewContext creates a new context.

func (*Context) Accept

func (ctx *Context) Accept() (conn io.ReadWriteCloser, err error)

Accept must be called by only the server.

func (*Context) Tomb

func (ctx *Context) Tomb() *tomb.Tomb

Tomb returns the tomb of the context.

func (*Context) Tunnel

func (ctx *Context) Tunnel() (conn io.ReadWriteCloser, err error)

Tunnel must be called by only the client.

Jump to

Keyboard shortcuts

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