Documentation ¶
Index ¶
- func PokeClient(clientAdr, myAddr string)
- func PokeListener(ln net.Listener, addCh chan<- string)
- func StartBackUpServer(bdb *battdb.Db, port string)
- func ZmqDecoder(gameBytes []byte) (game *bat.Game, err error)
- func ZmqEncode(game *bat.Game) (gameBytes []byte, err error)
- type NetZmq
- type NetZmqReciver
- type NetZmqSender
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 ¶
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 ¶
StartBackUpServer starts backup server.
Types ¶
type NetZmq ¶
type NetZmq struct {
// contains filtered or unexported fields
}
NetZmq zero messages queue.
type NetZmqReciver ¶
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()
Click to show internal directories.
Click to hide internal directories.