session

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2014 License: GPL-3.0-or-later Imports: 19 Imported by: 0

Documentation

Overview

Package session implements an encrypted data stream, authenticated through the station-to-station key exchange.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	Sink chan *Session // Channel receiving the accepted sessions
	// contains filtered or unexported fields
}

Session listener to accept inbound authenticated sessions.

func Listen

func Listen(addr *net.TCPAddr, key *rsa.PrivateKey) (*Listener, error)

Starts a TCP listener to accept incoming sessions, returning the socket ready to accept. If an auto-port (0) is requested, the port is updated in the arg.

func (*Listener) Accept

func (l *Listener) Accept(timeout time.Duration)

Starts the session connection accepter, with a maximum timeout to wait for an established connection to be handled.

func (*Listener) Close

func (l *Listener) Close() error

Terminates the acceptor and returns any encountered errors.

type Session

type Session struct {
	CtrlLink *link.Link // Network connection for high priority control messages
	DataLink *link.Link // Network connection for low priority data messages
	// contains filtered or unexported fields
}

Accomplishes secure and authenticated full duplex communication.

func Dial

func Dial(host string, port int, key *rsa.PrivateKey) (*Session, error)

Connects to a remote node and negotiates a session.

func (*Session) Close

func (s *Session) Close() error

Terminates the data transfers on the two channels

func (*Session) Start

func (s *Session) Start(cap int)

Starts the session data transfers on the control and data channels.

Jump to

Keyboard shortcuts

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