pnet

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	sync.Mutex
	net.Conn
	// contains filtered or unexported fields
}

func Dial

func Dial(network, address string) (*Conn, error)

func NewConn

func NewConn(c net.Conn) *Conn

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) IsClosed

func (c *Conn) IsClosed() bool

func (*Conn) ReadMessage

func (c *Conn) ReadMessage() (int32, []byte, error)

func (*Conn) WriteMessage

func (c *Conn) WriteMessage(i int32, b []byte) (n int, err error)

WriteMessage writes a message to the connection.

len(b) <= 65535

type Listener

type Listener struct {
	net.Listener
}

func Listen

func Listen(network, address string) (*Listener, error)

func NewListener

func NewListener(l net.Listener) *Listener

func (*Listener) Accept

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

Jump to

Keyboard shortcuts

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