Movatterモバイル変換


[0]ホーム

URL:


netx

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:3Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package netx contains types to describe and abstract over how dialing andlistening are performed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeDialFunc

type DialFunc func(ctxcontext.Context, network, addressstring) (net.Conn,error)

DialFunc is a function that dials a network address.

It's the type implemented by net.Dialer.DialContext or requiredby net/http.Transport.DialContext, etc.

typeNetwork

type Network interface {NewLocalTCPListener()net.ListenerListen(network, addressstring) (net.Listener,error)Dial(ctxcontext.Context, network, addressstring) (net.Conn,error)}

Network describes a network that can listen and dial. The two commonimplementations areRealNetwork, using the net package to use the realnetwork, or [memnet.Network], using an in-memory network (typically for testing)

funcRealNetwork

func RealNetwork()Network

RealNetwork returns a Network implementation that uses the realnet package.

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