netx

package
Version: v0.0.0-...-a494d39 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyDialer

func NewProxyDialer(proxyUrl string) (proxy.Dialer, error)

NewProxyDialer based on proxy url.

Types

type StatConn

type StatConn struct {
	net.Conn
	Reads, Writes *uint64
}

StatConn statistics read and write bytes for net connection.

func NewStatConn

func NewStatConn(c net.Conn) *StatConn

func NewStatConnReadWrite

func NewStatConnReadWrite(c net.Conn, reads, writes *uint64) *StatConn

func (*StatConn) Read

func (s *StatConn) Read(b []byte) (n int, err error)

Read reads bytes from net connection.

func (StatConn) ReadBytes

func (s StatConn) ReadBytes() uint64

func (*StatConn) Write

func (s *StatConn) Write(b []byte) (n int, err error)

Write writes bytes to net.

func (StatConn) WriteBytes

func (s StatConn) WriteBytes() uint64

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL