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: 0

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