comm

package
Version: v6.4.11 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comm

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

Comm is some basic TCP communication

func New

func New(c net.Conn) *Comm

New returns a new comm

func NewConnection

func NewConnection(address string, timelimit ...time.Duration) (c *Comm, err error)

NewConnection gets a new comm to a tcp address

func (*Comm) Close

func (c *Comm) Close()

Close closes the connection

func (*Comm) Connection

func (c *Comm) Connection() net.Conn

Connection returns the net.Conn connection

func (*Comm) Read

func (c *Comm) Read() (buf []byte, numBytes int, bs []byte, err error)

func (*Comm) Receive

func (c *Comm) Receive() (b []byte, err error)

Receive a message

func (*Comm) Send

func (c *Comm) Send(message []byte) (err error)

Send a message

func (*Comm) Write

func (c *Comm) Write(b []byte) (int, error)

Source Files

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