handshake

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGCMSession added in v0.3.0

func NewGCMSession(peerID protocol.PeerID, key [32]byte) protocol.Session

func NewGCMSessionManager added in v0.3.0

func NewGCMSessionManager() protocol.SessionManager

func NewInsecureSessionManager added in v0.3.0

func NewInsecureSessionManager() protocol.SessionManager

NewInsecureSessionManager returns a `protocol.SessionManager` that does no ecryption/authentication. Messages are read/written from/to connections as without modification or processing.

Types

type Handshaker

type Handshaker interface {
	// Handshake with a remote server by initiating, and then interactively
	// completing, a handshake protocol. The remote server is accessed by
	// reading/writing to the `io.ReaderWriter`.
	Handshake(ctx context.Context, rw io.ReadWriter) (protocol.Session, error)

	// AcceptHandshake from a remote client by waiting for the initiation of,
	// and then interactively completing, a handshake protocol. The remote
	// client is accessed by reading/writing to the `io.ReaderWriter`.
	AcceptHandshake(ctx context.Context, rw io.ReadWriter) (protocol.Session, error)
}

func New

func New(signVerifier protocol.SignVerifier, sessionManager protocol.SessionManager) Handshaker

Jump to

Keyboard shortcuts

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