Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanSocket ¶
func NewZmqChanSocket ¶
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