Frame.copyTo

Copies frame content to another message frame.

copy() returns a new Frame object, while copyTo(dest) copies the contents of this Frame into dest. dest must be a valid (i.e. initialized) Frame.

Warning: These functions may not do what you think they do. Please refer to $(ZMQAPI zmq_msg_copy(),the $(ZMQ) manual) for details.

struct Frame
@safe
void
copyTo
()

Throws

ZmqException if $(ZMQ) reports an error.

Corresponds to

$(ZMQREF zmq_msg_copy())

Examples

import std.string: representation;
auto msg1 = Frame(3);
msg1.data[] = "foo".representation;
auto msg2 = msg1.copy();
assert (msg2.data.asString() == "foo");

Meta