communication

package
v0.0.0-...-5abc84a Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannelCommunicatorMap

func NewChannelCommunicatorMap(partyIDs []party.ID) map[party.ID]Communicator

func NewUDPCommunicatorMap

func NewUDPCommunicatorMap(IDs []party.ID) map[party.ID]Communicator

Types

type Channel

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

func (*Channel) Done

func (c *Channel) Done()

func (*Channel) Incoming

func (c *Channel) Incoming() <-chan *messages.Message

func (*Channel) Send

func (c *Channel) Send(msg *messages.Message) error

func (*Channel) Timeout

func (c *Channel) Timeout() time.Duration

type Communicator

type Communicator interface {
	Send(msg *messages.Message) error

	Incoming() <-chan *messages.Message
	Done()
	Timeout() time.Duration
}

type Handler

type Handler struct {
	State *state.State
	Comm  Communicator
}

Handler holds the information for a certain Round by a participant. It makes it easier to work with the underlying Round interface.

func (*Handler) HandleMessage

func (h *Handler) HandleMessage()

HandleMessage is a blocking function that exits

func (*Handler) ProcessAll

func (h *Handler) ProcessAll()

type KeyGenHandler

type KeyGenHandler struct {
	*Handler
	Out *keygen.Output
}

func NewKeyGenHandler

func NewKeyGenHandler(comm Communicator, ID party.ID, IDs []party.ID, T party.Size) (*KeyGenHandler, error)

type SignHandler

type SignHandler struct {
	*Handler
	Out *sign.Output
}

func NewSignHandler

func NewSignHandler(comm Communicator, IDs []party.ID, secret *eddsa.SecretShare, public *eddsa.Public, message []byte) (*SignHandler, error)

type UDP

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

func NewUDPCommunicator

func NewUDPCommunicator(id party.ID, laddr *net.UDPAddr) (c *UDP, ip string)

func (*UDP) AddPeer

func (c *UDP) AddPeer(id party.ID, ip string)

func (*UDP) Done

func (c *UDP) Done()

func (*UDP) Incoming

func (c *UDP) Incoming() <-chan *messages.Message

func (*UDP) Send

func (c *UDP) Send(msg *messages.Message) error

func (*UDP) Start

func (c *UDP) Start()

func (*UDP) Timeout

func (c *UDP) Timeout() time.Duration

Jump to

Keyboard shortcuts

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