hub

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorClosedConnection = errors.New("Connection already closed.")
)

Functions

This section is empty.

Types

type Connection added in v1.12.2

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

func (*Connection) Close added in v1.12.2

func (this *Connection) Close() error

func (*Connection) LocalAddr added in v1.12.2

func (this *Connection) LocalAddr() net.Addr

func (*Connection) Read added in v1.12.2

func (this *Connection) Read(b []byte) (int, error)

func (*Connection) Release added in v1.12.6

func (this *Connection) Release()

func (*Connection) RemoteAddr added in v1.12.2

func (this *Connection) RemoteAddr() net.Addr

func (*Connection) SetDeadline added in v1.12.2

func (this *Connection) SetDeadline(t time.Time) error

func (*Connection) SetReadDeadline added in v1.12.2

func (this *Connection) SetReadDeadline(t time.Time) error

func (*Connection) SetWriteDeadline added in v1.12.2

func (this *Connection) SetWriteDeadline(t time.Time) error

func (*Connection) Write added in v1.12.2

func (this *Connection) Write(b []byte) (int, error)

type ConnectionHandler added in v1.12.2

type ConnectionHandler func(*Connection)

type TCPHub

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

func ListenTCP

func ListenTCP(port v2net.Port, callback ConnectionHandler, tlsConfig *tls.Config) (*TCPHub, error)

func (*TCPHub) Close

func (this *TCPHub) Close()

type TimedInboundRay added in v1.13.1

type TimedInboundRay struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTimedInboundRay added in v1.13.1

func NewTimedInboundRay(name string, inboundRay ray.InboundRay, server *UDPServer) *TimedInboundRay

func (*TimedInboundRay) InboundInput added in v1.13.1

func (this *TimedInboundRay) InboundInput() ray.OutputStream

func (*TimedInboundRay) InboundOutput added in v1.13.1

func (this *TimedInboundRay) InboundOutput() ray.InputStream

func (*TimedInboundRay) Monitor added in v1.13.1

func (this *TimedInboundRay) Monitor()

func (*TimedInboundRay) Release added in v1.13.1

func (this *TimedInboundRay) Release()

type UDPHub

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

func ListenUDP

func ListenUDP(port v2net.Port, callback UDPPayloadHandler) (*UDPHub, error)

func (*UDPHub) Close

func (this *UDPHub) Close()

func (*UDPHub) WriteTo

func (this *UDPHub) WriteTo(payload []byte, dest v2net.Destination) (int, error)

type UDPPayloadHandler

type UDPPayloadHandler func(*alloc.Buffer, v2net.Destination)

type UDPResponseCallback

type UDPResponseCallback func(destination v2net.Destination, payload *alloc.Buffer)

type UDPServer

type UDPServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewUDPServer

func NewUDPServer(packetDispatcher dispatcher.PacketDispatcher) *UDPServer

func (*UDPServer) Dispatch

func (this *UDPServer) Dispatch(source v2net.Destination, destination v2net.Destination, payload *alloc.Buffer, callback UDPResponseCallback)

func (*UDPServer) RemoveRay added in v1.13.1

func (this *UDPServer) RemoveRay(name string)

Jump to

Keyboard shortcuts

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