relay

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package relay provides functionality to create a Relay Server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Debug Mode
	Debug bool
	// Listen Address
	Addr *net.UDPAddr
	// Broker Address
	BrokerAddr *net.UDPAddr
	// Broker Validation Token
	BrokerToken string
	// contains filtered or unexported fields
}

Relay Server Config

type Connection

type Connection struct {

	// Closed Status
	Closed bool
	// contains filtered or unexported fields
}

Relay Server Connection

func (*Connection) Close

func (c *Connection) Close()

Close Connection

func (*Connection) String

func (c *Connection) String() string

Stringify

type Server

type Server struct {

	// Open Status
	Open bool
	// Exit Channel
	Exit chan bool
	// Closed Status
	Closed bool
	// contains filtered or unexported fields
}

Relay Server

func New

func New(config Config) (s *Server, err error)

Create a Relay Server

func (*Server) Close

func (s *Server) Close()

Close Server

func (*Server) Listen

func (s *Server) Listen() (err error)

Listen for connections

func (*Server) NewConnection

func (s *Server) NewConnection(data *model.P2PRelayConnectionData) (conn *Connection)

Create a new Connection

Jump to

Keyboard shortcuts

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