cmsg

package
v0.0.0-...-3d1c771 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmsg

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

The Cmsg type holds a single key-value message consisting of a list of 0 or more frames.

func NewCmsg

func NewCmsg(sequence int64) (cmsg *Cmsg)

Constructor, takes a sequence number for the new Cmsg instance.

func RecvCmsg

func RecvCmsg(socket *zmq.Socket) (cmsg *Cmsg, err error)

The RecvCmsg function reads a key-value message from socket, and returns a new Cmsg instance.

func (*Cmsg) Dump

func (cmsg *Cmsg) Dump()

The dump method prints the key-value message to stderr, for debugging and tracing.

func (*Cmsg) GetBody

func (cmsg *Cmsg) GetBody() (body string, err error)

func (*Cmsg) GetKey

func (cmsg *Cmsg) GetKey() (key string, err error)

func (*Cmsg) GetSequence

func (cmsg *Cmsg) GetSequence() (sequence int64, err error)

func (*Cmsg) Send

func (cmsg *Cmsg) Send(socket *zmq.Socket) (err error)

The send method sends a multi-frame key-value message to a socket.

func (*Cmsg) SetBody

func (cmsg *Cmsg) SetBody(body string)

func (*Cmsg) SetKey

func (cmsg *Cmsg) SetKey(key string)

func (*Cmsg) SetSequence

func (cmsg *Cmsg) SetSequence(sequence int64)

func (*Cmsg) Size

func (cmsg *Cmsg) Size() int

The size method returns the body size of the last-read message, if any.

func (*Cmsg) Store

func (cmsg *Cmsg) Store(cmap map[string]*Cmsg)

The store method stores the key-value message into a hash map, unless the key is nil.

Jump to

Keyboard shortcuts

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