client

package
v0.0.0-...-7c1852d Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToMiners

func ConnectToMiners(listener net.Listener) []net.Conn

func MulticastSendTransactionToMinersSimulatedDelay

func MulticastSendTransactionToMinersSimulatedDelay(clientTransaction Transaction, minerChannels []net.Conn)

MulticastSendSimulatedDelay waits for a random bounded time to simulate message delay and then sends a transaction object to specified destinations via tcp.

func SendRequest

func SendRequest(minerChannels []net.Conn, delayInterval int)

SendRequest() periodically multicasts transactions to miners.

func SendStartup

func SendStartup(clientID int) net.Conn

SendStartup sends a start up message to the controller.

func WaitForController

func WaitForController(controllerChannel net.Conn)

WaitForController waits for a PROCEED message (string, not an object) from the controller that all processes have started up.

Types

type Clients

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

func (*Clients) NewClient

func (n *Clients) NewClient(name string) client

Creates a new client

Jump to

Keyboard shortcuts

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