Help us shape the future of Go! Take the 2026 Go Developer Survey

tcp

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectTimeout

func ConnectTimeout(timeout time.Duration) func(*TCPFactory)

func Context

func Context(ctx context.Context) func(*TCPFactory)

func ListenTimeout

func ListenTimeout(timeout time.Duration) func(*TCPFactory)

func ReadTimeout

func ReadTimeout(timeout time.Duration) func(*TCPFactory)

func ResolveTimeout

func ResolveTimeout(timeout time.Duration) func(*TCPFactory)

func Timeout

func Timeout(timeout time.Duration) func(*TCPFactory)

func WriteTimeout

func WriteTimeout(timeout time.Duration) func(*TCPFactory)

Types

type TCPConn

type TCPConn struct {
	// contains filtered or unexported fields
}

func (*TCPConn) Close

func (c *TCPConn) Close() error

func (*TCPConn) Read

func (c *TCPConn) Read(buf base.Buffer) (l int, e error)

func (*TCPConn) SetReadTimeout

func (c *TCPConn) SetReadTimeout(timeout int)

func (*TCPConn) SetTimeout

func (c *TCPConn) SetTimeout(timeout int)

func (*TCPConn) SetWriteTimeout

func (c *TCPConn) SetWriteTimeout(timeout int)

func (*TCPConn) Write

func (c *TCPConn) Write(buf base.Buffer) (l int, e error)

type TCPFactory

type TCPFactory struct {
	// contains filtered or unexported fields
}

func NewTCPFactory

func NewTCPFactory(driver vmnet.NetDriver, opt ...func(*TCPFactory)) *TCPFactory

func (*TCPFactory) Connect

func (f *TCPFactory) Connect(addr string, args ...int) (*TCPConn, error)

func (*TCPFactory) Connect4

func (f *TCPFactory) Connect4(addr string, args ...int) (*TCPConn, error)

func (*TCPFactory) Connect6

func (f *TCPFactory) Connect6(addr string, args ...int) (*TCPConn, error)

func (*TCPFactory) Listen

func (f *TCPFactory) Listen(addr string, args ...int) (*TCPListener, error)

func (*TCPFactory) Listen4

func (f *TCPFactory) Listen4(addr string, args ...int) (*TCPListener, error)

func (*TCPFactory) Listen6

func (f *TCPFactory) Listen6(addr string, args ...int) (*TCPListener, error)

type TCPListener

type TCPListener struct {
	// contains filtered or unexported fields
}

func (*TCPListener) Accept

func (l *TCPListener) Accept() (*TCPConn, error)

func (*TCPListener) Close

func (l *TCPListener) Close() error

func (*TCPListener) SetReadTimeout

func (l *TCPListener) SetReadTimeout(timeout int)

func (*TCPListener) SetTimeout

func (l *TCPListener) SetTimeout(timeout int)

func (*TCPListener) SetWriteTimeout

func (l *TCPListener) SetWriteTimeout(timeout int)

Jump to

Keyboard shortcuts

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