encryptconn

package
v3.0.0-beta13 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package encryptconn provides encrypted/decrypted net.Conn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnNoder

type ConnNoder interface {
	net.Conn
	ReadWithNode(b []byte) (n int, nodename string, err error)
}

type T

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

T struct provides net.Conn over enc net.Conn

func New

func New(encConn net.Conn, ed encryptDecrypter) *T

New returns a new *T that will use encrypted net.Conn

func (*T) Read

func (t *T) Read(b []byte) (n int, err error)

Read implement Reader interface for T

read and decrypt data read from t.Conn

func (*T) ReadWithNode

func (t *T) ReadWithNode(b []byte) (n int, nodename string, err error)

ReadWithNode implement ConnNoder interface for T

read and decrypt data read from t.Conn

func (*T) SrcNode

func (t *T) SrcNode() string

SrcNode returns the encrypter nodename

func (*T) Write

func (t *T) Write(b []byte) (n int, err error)

Write implement Writer interface for T

Write encrypted d to T.Conn

Jump to

Keyboard shortcuts

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