comm

package
v9.6.17 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpProxy = ""
View Source
var MAGIC_BYTES = []byte("croc")
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