arnet

package
v0.0.0-...-0992052 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PokeClient

func PokeClient(clientAdr, myAddr string)

PokeClient poke the client with address to signal it is ready.

func PokeListener

func PokeListener(ln net.Listener, addCh chan<- string)

PokeListener listen for pokes and send them on. Create listner with ln, err := net.Listen("tcp", clientAddr) stop with ln.Close() should be called in a goroutine.

func StartBackUpServer

func StartBackUpServer(bdb *battdb.Db, port string)

StartBackUpServer starts backup server.

func ZmqDecoder

func ZmqDecoder(gameBytes []byte) (game *bat.Game, err error)

func ZmqEncode

func ZmqEncode(game *bat.Game) (gameBytes []byte, err error)

Types

type NetZmq

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

NetZmq zero messages queue.

type NetZmqReciver

type NetZmqReciver struct {
	NetZmq
	GameCh chan []byte
}

func NewZmqReciver

func NewZmqReciver(port string) (nz *NetZmqReciver, err error)

func (*NetZmqReciver) Close

func (nz *NetZmqReciver) Close() (err error)

func (*NetZmqReciver) Start

func (nz *NetZmqReciver) Start()

type NetZmqSender

type NetZmqSender struct {
	NetZmq
	FinCh    chan struct{}
	GameCh   chan *bat.Game
	BrokenCh chan *bat.Game
}

func NewZmqSender

func NewZmqSender(addr string) (nz *NetZmqSender, err error)

func (*NetZmqSender) Close

func (nz *NetZmqSender) Close() (err error)

func (*NetZmqSender) Start

func (nz *NetZmqSender) Start()

Jump to

Keyboard shortcuts

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