receive

package
v0.0.0-...-2382a3d Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

func NewReceiver

func NewReceiver(addr string, handle SpaceMessageHandler, log *log.Logger) *Receiver

NewReceiver creates a new receiver.

func (*Receiver) Run

func (r *Receiver) Run() func()

Run is the main runloop for the receiver. It concurrently runs an HTTP server and returns a function to stop the receiver.

type SpaceMessageHandler

type SpaceMessageHandler func(message protocol.SpaceMessage)

Callback handler for received messages.

Jump to

Keyboard shortcuts

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