encconn

package
v0.18.7 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncConn

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

EncConn wraps net.Conn with box encryption

NOTE: currently not working (as of August 2021)

func NewEncConn

func NewEncConn(c net.Conn, sharedSecret [32]byte) *EncConn

NewEncConn wraps a net.Conn with a shared secret.

func (*EncConn) Read

func (c *EncConn) Read(b []byte) (int, error)

Read reads data from the connection. Read can be made to time out and return an Error with Timeout() == true after a fixed time limit; see SetDeadline and SetReadDeadline.

func (*EncConn) Write

func (c *EncConn) Write(b []byte) (n int, err error)

Write writes data to the connection. Write can be made to time out and return an Error with Timeout() == true after a fixed time limit; see SetDeadline and SetWriteDeadline.

Jump to

Keyboard shortcuts

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