package xnet

import "git.sr.ht/~jamesponddotco/xstd-go/xnet"

Package xnet provides functions and utilities that extend Go's standard net module.

Index

Constants

const (
	// DefaultDialerTimeout is the default maximum amount of time a dial will wait for
	// a connection to complete.
	DefaultDialerTimeout = 30 * time.Second

	// DefaultDialerKeepAlive is the default amount of time a connection will be
	// kept alive.
	DefaultDialerKeepAlive = 30 * time.Second
)

Functions

func NewDialer

func NewDialer() *net.Dialer

NewDialer returns a new Dialer with default timeout values.

These values are not one-size-fits-all and should be adapted based on specific application needs and network characteristics.

Source Files

dialer.go xnet.go

Directories

PathSynopsis
xnet/xhttpPackage xhttp provides utility functions for HTTP requests.
xnet/xhttp/xhttputilPackage xhttputil provides utility functions for HTTP requests and responses.
xnet/xhttp/xmiddlewarePackage xmiddleware contains simple middleware functions.
xnet/xurlPackage xurl provides helpers and utilities for working with URLs.
Version
v0.13.1 (latest)
Published
Jan 29, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
4 days ago

Tools for package owners.