Movatterモバイル変換


[0]ホーム

URL:


portlist

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:22Imported by:4

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

The portlist package contains code that checks what ports are open andlistening on the current machine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcPollIntervaladded inv1.44.0

func PollInterval()time.Duration

PollInterval is the recommended OS-specific intervalto wait between *Poller.Poll method calls.

Types

typeList

type List []Port

List is a list of Ports.

func (List)String

func (plList) String()string

typePoller

type Poller struct {// IncludeLocalhost controls whether services bound to localhost are included.//// This field should only be changed before calling Run.IncludeLocalhostbool// contains filtered or unexported fields}

Poller scans the systems for listening ports periodically and sendsthe results to C.

func (*Poller)Close

func (p *Poller) Close()error

Close closes the Poller.

func (*Poller)Polladded inv1.44.0

func (p *Poller) Poll() (ports []Port, changedbool, errerror)

Poll returns the list of listening ports, if changed froma previous call as indicated by the changed result.

typePort

type Port struct {Protostring// "tcp" or "udp"Portuint16// port numberProcessstring// optional process name, if found (requires suitable permissions)Pidint// process ID, if known (requires suitable permissions)}

Port is a listening port on the machine.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp