pivots

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: GPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pivot

func Pivot(pivotID uint32) *net.Conn

func PivotReadEnvelope

func PivotReadEnvelope(conn *net.Conn) (*sliverpb.Envelope, error)

PivotReadEnvelope - Reads a protobuf envolope from a generic connection

func PivotWriteEnvelope

func PivotWriteEnvelope(conn *net.Conn, envelope *sliverpb.Envelope) error

PivotWriteEnvelope - Writes a protobuf envolope to a generic connection

func ReconnectActivePivots

func ReconnectActivePivots(connection *transports.Connection)

ReconnectActivePivots - Send a new PivotOpen message back to the server for each alive pivot

func SendPivotClose

func SendPivotClose(pivotID uint32, err error, connection *transports.Connection)

SendPivotClose - Sends a PivotClose message back to the server

func SendPivotOpen

func SendPivotOpen(pivotID uint32, registerMsg []byte, connection *transports.Connection)

SendPivotOpen - Sends a PivotOpen message back to the server

func StartTCPListener

func StartTCPListener(address string) error

StartTCPListener - Start a TCP listener

Types

type PivotsMap

type PivotsMap struct {
	Pivots *map[uint32]*pivotsMapEntry
	// contains filtered or unexported fields
}

PivotsMap - struct that defines de pivots, provides atomic access

func (*PivotsMap) AddPivot

func (p *PivotsMap) AddPivot(pivotID uint32, conn *net.Conn, t, addr string)

AddPivot - Add a pivot to the map (atomically)

func (*PivotsMap) Pivot

func (p *PivotsMap) Pivot(pivotID uint32) *pivotsMapEntry

Pivot - Get Pivot by ID

func (*PivotsMap) RemovePivot

func (p *PivotsMap) RemovePivot(pivotID uint32)

RemovePivot - Add a pivot to the map (atomically)

Jump to

Keyboard shortcuts

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