mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +01:00
documentation clarification on pipe::write failure
When pipe::write succeeds, it takes control of the message's data buffer. When it fails, it has not taken control. The caller should clean up the message appropriately (msg::close).
This commit is contained in:
@@ -86,12 +86,14 @@ namespace zmq
|
|||||||
// Reads a message to the underlying pipe.
|
// Reads a message to the underlying pipe.
|
||||||
bool read (msg_t *msg_);
|
bool read (msg_t *msg_);
|
||||||
|
|
||||||
// Checks whether messages can be written to the pipe. If writing
|
// Checks whether messages can be written to the pipe. If the pipe is
|
||||||
// the message would cause high watermark the function returns false.
|
// closed or if writing the message would cause high watermark the
|
||||||
|
// function returns false.
|
||||||
bool check_write ();
|
bool check_write ();
|
||||||
|
|
||||||
// Writes a message to the underlying pipe. Returns false if the
|
// Writes a message to the underlying pipe. Returns false if the
|
||||||
// message cannot be written because high watermark was reached.
|
// message does not pass check_write. If false, the message object
|
||||||
|
// retains ownership of its message buffer.
|
||||||
bool write (msg_t *msg_);
|
bool write (msg_t *msg_);
|
||||||
|
|
||||||
// Remove unfinished parts of the outbound message from the pipe.
|
// Remove unfinished parts of the outbound message from the pipe.
|
||||||
|
|||||||
Reference in New Issue
Block a user