helpers

package
v0.0.176 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADBCNXNPacket

func ADBCNXNPacket() []byte

func After added in v0.0.168

func After(timeout int) <-chan time.Time

func CloseConnOnCancel added in v0.0.168

func CloseConnOnCancel(ctx context.Context, conn net.Conn) func()

func Context added in v0.0.168

func Context(ctx context.Context, timeout int) (context.Context, context.CancelFunc)

func ContextDuration added in v0.0.168

func ContextDuration(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

func Dial added in v0.0.168

func Dial(ctx context.Context, network, address string, timeout int) (net.Conn, error)

func DialDuration added in v0.0.168

func DialDuration(ctx context.Context, network, address string, timeout time.Duration) (net.Conn, error)

func FirstLine

func FirstLine(s string) string

func GenericResult

func GenericResult(host string, ip net.IP, port int, transport common.TransportType, appProtocol string, version string, metadata map[string]string) *discoverfern.ServiceDetails

func HasTimeout added in v0.0.168

func HasTimeout(timeout int) bool

func IsRMIEndpointHost

func IsRMIEndpointHost(b []byte) bool

func LooksLikeGitDaemon

func LooksLikeGitDaemon(resp []byte) bool

func LooksLikeIRC

func LooksLikeIRC(s string) bool

func SetDeadline added in v0.0.168

func SetDeadline(conn net.Conn, timeout int) error

func SetDeadlineDuration added in v0.0.168

func SetDeadlineDuration(conn net.Conn, timeout time.Duration) error

func SetReadDeadline added in v0.0.168

func SetReadDeadline(conn net.Conn, timeout int) error

func SetReadDeadlineDuration added in v0.0.168

func SetReadDeadlineDuration(conn net.Conn, timeout time.Duration) error

func SetWriteDeadline added in v0.0.168

func SetWriteDeadline(conn net.Conn, timeout int) error

func SetWriteDeadlineDuration added in v0.0.168

func SetWriteDeadlineDuration(conn net.Conn, timeout time.Duration) error

func TCPConn

func TCPConn(ctx context.Context, ip net.IP, port int, timeout int) (net.Conn, error)

func TCPExchange

func TCPExchange(ctx context.Context, ip net.IP, port int, timeout int, probe []byte, maxRead int) ([]byte, error)

func TCPReadBanner

func TCPReadBanner(ctx context.Context, ip net.IP, port int, timeout int, maxRead int) ([]byte, error)

func Timeout added in v0.0.168

func Timeout(timeout int) time.Duration

func UDPConn added in v0.0.168

func UDPConn(ctx context.Context, ip net.IP, port int, timeout int) (net.Conn, error)

func UDPExchange

func UDPExchange(ctx context.Context, ip net.IP, port int, timeout int, probe []byte, maxRead int) ([]byte, error)

func ValidADBPacket

func ValidADBPacket(packet []byte) bool

func ValidGopherItem

func ValidGopherItem(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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