handshake

package
v0.0.0-...-fc88c08 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package handshake implements protocols for identifying the peer.

These protocols are used before some proper sync protocols, to figure out who we are talking to. This is currently not cryptographically secure, but as long as we don't punish peers, which send some wrong information this shouldn't impact anything negatively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptGreeting

func AcceptGreeting(r io.Reader) (pid uint16, sid uint32, err error)

AcceptGreeting accepts a greeting and returns the information it learned from it.

func Greet

func Greet(w io.Writer, pid uint16, sid uint32) error

Greet sends a greeting to the given conn.

Types

This section is empty.

Jump to

Keyboard shortcuts

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