Frame.rebuild

Reinitializes the Frame object as an empty message.

This function will first call $(FREF Frame.close) to release the resources associated with the message frame, and then it will initialize it anew, exactly as if it were constructed with $(LINK2 #Frame.opCall,Frame()).

  1. void rebuild()
    struct Frame
    @safe
    void
    rebuild
    ()
  2. void rebuild(size_t size)
  3. void rebuild(ubyte[] data)

Throws

ZmqException if $(ZMQ) reports an error.

Corresponds to

$(ZMQREF zmq_msg_close()) followed by $(ZMQREF zmq_msg_init())

Examples

auto msg = Frame(256);
assert (msg.size == 256);
msg.rebuild();
assert (msg.size == 0);

Meta