net

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Fd         uint32
	ConnFamily uint32
	ConnType   uint32
	Pid        int32
	LocalIP    string
	LocalPort  uint32
	RemoteIP   string
	RemotePort uint32
	Status     string
}

Connection provides a concurrency-safe wrapper for a Connection that implements a starlark.Value.

func (Connection) Freeze

func (c Connection) Freeze()

Freeze is a no-op since the underlying connection is safe for concurrent use.

func (Connection) Hash

func (c Connection) Hash() (uint32, error)

Hash will error since the connection type is not intended to be hashable.

func (Connection) String

func (c Connection) String() string

String returns connection metadata.

func (Connection) Truth

func (c Connection) Truth() starlark.Bool

Truth value of a connection is True if the Status is not the empty string.

func (Connection) Type

func (c Connection) Type() string

Type returns 'connection' to indicate the type of the connection within starlark.

Jump to

Keyboard shortcuts

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