network

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagedConnectionCaller

func ManagedConnectionCaller(handler interface{}, params ...interface{})

Types

type BufferedConnectionEvents

type BufferedConnectionEvents struct {
	ReceiveData *events.Event
	Close       *events.Event
	Error       *events.Event
}

type ManagedConnection

type ManagedConnection struct {
	Conn   net.Conn
	Events BufferedConnectionEvents

	BytesRead    int
	BytesWritten int
	// contains filtered or unexported fields
}

func NewManagedConnection

func NewManagedConnection(conn net.Conn) *ManagedConnection

func (*ManagedConnection) Close

func (mc *ManagedConnection) Close() error

func (*ManagedConnection) LocalAddr

func (mc *ManagedConnection) LocalAddr() net.Addr

func (*ManagedConnection) Read

func (mc *ManagedConnection) Read(receiveBuffer []byte) (n int, err error)

func (*ManagedConnection) RemoteAddr

func (mc *ManagedConnection) RemoteAddr() net.Addr

func (*ManagedConnection) SetDeadline

func (mc *ManagedConnection) SetDeadline(t time.Time) error

func (*ManagedConnection) SetReadDeadline

func (mc *ManagedConnection) SetReadDeadline(t time.Time) error

func (*ManagedConnection) SetReadTimeout

func (mc *ManagedConnection) SetReadTimeout(d time.Duration) error

func (*ManagedConnection) SetTimeout

func (mc *ManagedConnection) SetTimeout(d time.Duration) error

func (*ManagedConnection) SetWriteDeadline

func (mc *ManagedConnection) SetWriteDeadline(t time.Time) error

func (*ManagedConnection) SetWriteTimeout

func (mc *ManagedConnection) SetWriteTimeout(d time.Duration) error

func (*ManagedConnection) Write

func (mc *ManagedConnection) Write(data []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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