comm

package
v8.6.12 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MAXBYTES = 4000000

Variables

View Source
var Socks5Proxy = ""

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) (n int, err error)

Jump to

Keyboard shortcuts

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