packet

package
v0.20.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0 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

Index

Constants

View Source
const (

	// PeerKeyHashSize - constant for peer key hash size
	PeerKeyHashSize = 16

	// MessageProxyTransportSize - constant for proxy transport message size
	MessageProxyTransportSize = 36

	// MessageProxyTransportType - constant for proxy transport message
	MessageProxyTransportType MessageType = 6

	// constant for proxy server buffer size
	DefaultBodySize = 65000 + MessageProxyTransportSize
)

Variables

This section is empty.

Functions

func ExtractInfo

func ExtractInfo(buffer []byte, n int) (int, string, string, error)

ExtractInfo - extracts proxy transport message from the data buffer

func ProcessPacketBeforeSending

func ProcessPacketBeforeSending(buf []byte, n int, srckey, dstKey string) ([]byte, int, string, string)

ProcessPacketBeforeSending - encodes data required for proxy transport message

Types

type MessageType

type MessageType uint32

MessageType - custom type for message type

type ProxyMessage

type ProxyMessage struct {
	Type     MessageType
	Sender   [PeerKeyHashSize]byte
	Reciever [PeerKeyHashSize]byte
}

ProxyMessage - struct for proxy message

Jump to

Keyboard shortcuts

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