sockets

package
v2.0.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind = string
const (
	TCP  Kind = "tcp"
	TCP6 Kind = "tcp6"
	UDP  Kind = "udp"
	UDP6 Kind = "udp6"
)

type Lister

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

func NewLister

func NewLister() (*Lister, error)

func (*Lister) Close

func (lister *Lister) Close() error

func (*Lister) List

func (lister *Lister) List() ([]Socket, error)

type Socket

type Socket struct {
	Kind  Kind   `json:"kind"`
	IP    net.IP `json:"ip"`
	Port  uint16 `json:"port"`
	State State  `json:"state"`
}

type State

type State = byte
const (
	TCPEstablished State = 0x1
	TCPListen      State = 0xA
	UDPUnconnected State = 0x7
)

Jump to

Keyboard shortcuts

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