zmqchan

package
v0.0.0-...-20a20cb Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanSocket

type ChanSocket interface {
	Close() error
	GetTxChan() chan<- [][]byte
	GetRxChan() <-chan [][]byte
}

func NewZmqChanSocket

func NewZmqChanSocket(zSock *zmq.Socket, txbuf int, rxbuf int) (ChanSocket, error)

func NewZmqChanSocket(zmqContext *zmq.Context, zSock *zmq.Socket, txbuf int, rxbuf in) (*ZmqChanSocket, error)

Produce a new ZmqChanSocket. Pass a contact and a zmq.Socket, plus the buffering parameters for the channels.

If this call succeeds (err == nil), then a ZmqChanSocket is returned, and control of your zmq.Socket is passed irrevocably to this routine. You should forget you ever had the socket. Do not attempt to use it in any way, as its manipulation is now the responsibility of goroutines launched by this routine. Closing the ZmqChanSocket will also close your zmq.Socket.

If this routine errors, it is the caller's responsibility to close the zmq.Socket

type ChanSocketImpl

type ChanSocketImpl struct {
	TxChan chan [][]byte
	RxChan chan [][]byte
	// contains filtered or unexported fields
}

func (*ChanSocketImpl) Errors

func (impl *ChanSocketImpl) Errors() <-chan error

type ZmqChanSocket

type ZmqChanSocket struct {
	Context *zmq.Context

	ChanSocketImpl
	// contains filtered or unexported fields
}

func (*ZmqChanSocket) Close

func (s *ZmqChanSocket) Close() error

func (*ZmqChanSocket) GetRxChan

func (s *ZmqChanSocket) GetRxChan() <-chan [][]byte

func (*ZmqChanSocket) GetTxChan

func (s *ZmqChanSocket) GetTxChan() chan<- [][]byte

Jump to

Keyboard shortcuts

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