espn

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMultiConn

func SetMultiConn(d *espat.Device, multiConn bool) error

SetMultiConn enables/disables the multiple connection mode.

func SetPasvRecv

func SetPasvRecv(d *espat.Device, pasvRecv bool) error

SetPasvRecv enables/disables the passive receive mode.

Types

type Addr

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

func (*Addr) Network

func (a *Addr) Network() string

func (*Addr) String

func (a *Addr) String() string

type Conn

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

A Conn represents a TCP or UDP conection.

func DialDev

func DialDev(d *espat.Device, network, address string) (*Conn, error)

DialDev works like the net.Dial function.

func (*Conn) Close

func (c *Conn) Close() error

Close works like the net.Conn Close method.

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() *Addr

LocalAddr works like the net.Conn LocalAddr method.

func (*Conn) Read

func (c *Conn) Read(p []byte) (n int, err error)

Read implements io.Reader interface. BUG: Read cannot be used concurently in active mode.

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() *Addr

RemoteAddr works like the net.Conn RemoteAddr method.

func (*Conn) SetReadDeadline

func (c *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline works like the net.Conn SetReadDeadline method.

func (*Conn) SetWriteDeadline

func (c *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline works like the net.Conn SetWriteDeadline method.

func (*Conn) Write

func (c *Conn) Write(p []byte) (n int, err error)

Write implements io.Writer interface.

func (*Conn) WriteString

func (c *Conn) WriteString(p string) (n int, err error)

WriteString implements io.StringWriter interface.

type Listener

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

func ListenDev

func ListenDev(d *espat.Device, network, address string) (*Listener, error)

ListenDev works like the net.Listen function.

func (*Listener) Accept

func (ls *Listener) Accept() (*Conn, error)

Accept works like the net.Listener Accept method.

func (*Listener) Addr

func (ls *Listener) Addr() *Addr

Addr works like the net.Listener Addr method.

func (*Listener) Close

func (ls *Listener) Close() error

Close works like the net.Listener Close method.

Directories

Path Synopsis
examples
client
Client is an example of TCP/UDP client.
Client is an example of TCP/UDP client.
simpleclient
Simpleclient is a simple TCP-only client.
Simpleclient is a simple TCP-only client.
simpleserver
Simpleserver is a simple TCP-only server.
Simpleserver is a simple TCP-only server.

Jump to

Keyboard shortcuts

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