ZMQ_MSG_COPY(3) 0MQ Manual ZMQ_MSG_COPY(3)NAME
zmq_msg_copy - copy content of a message to another message
SYNOPSIS
int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);
DESCRIPTION
The zmq_msg_copy() function shall copy the message object referenced by src to the message object referenced by dest. The original content
of dest, if any, shall be released.
Caution
The implementation may choose not to physically copy the message content, rather to share the underlying buffer between src and dest.
Avoid modifying message content after a message has been copied with zmq_msg_copy(), doing so can result in undefined behaviour. If
what you need is an actual hard copy, allocate a new message using zmq_msg_init_size() and copy the message content using memcpy().
Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
RETURN VALUE
The zmq_msg_copy() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.
ERRORS
EFAULT
Invalid message.
SEE ALSO zmq_msg_move(3)zmq_msg_init(3)zmq_msg_init_size(3)zmq_msg_init_data(3)zmq_msg_close(3)zmq(7)AUTHORS
This manual page was written by the 0MQ community.
0MQ 2.2.0 04/04/2012 ZMQ_MSG_COPY(3)
Check Out this Related Man Page
ZMQ_MSG_INIT(3) 0MQ Manual ZMQ_MSG_INIT(3)NAME
zmq_msg_init - initialise empty 0MQ message
SYNOPSIS
int zmq_msg_init (zmq_msg_t *msg);
DESCRIPTION
The zmq_msg_init() function shall initialise the message object referenced by msg to represent an empty message. This function is most
useful when called before receiving a message with zmq_recv().
Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t
twice.
RETURN VALUE
The zmq_msg_init() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.
ERRORS
No errors are defined.
EXAMPLE
Receiving a message from a socket.
zmq_msg_t msg;
rc = zmq_msg_init (&msg);
assert (rc == 0);
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);
SEE ALSO zmq_msg_init_size(3)zmq_msg_init_data(3)zmq_msg_close(3)zmq_msg_data(3)zmq_msg_size(3)zmq(7)AUTHORS
This manual page was written by the 0MQ community.
0MQ 2.2.0 04/04/2012 ZMQ_MSG_INIT(3)
Hi,
I have a file in my unix system let's call it FileName.
First I want to copy its content into a another file, but outside of the unix, meaning I could open it at home. (text file would be perfect)
Second (if it's possible) I need to take the first word of each line in the file (you know... (2 Replies)
i cant do ftp to my unix server, basically i cant take my file out from unix server.
now i want to copy the content of that file on windows based appl ..say..notepad..
the number of lines is apprx 10000...
one way is to do
cat filename | more
then right clicking and pasting in the... (3 Replies)
Hi,
May i know how can i view the lastest content of the log file. Currently, i use the "more" command :
more logfile
However, it will give me the content last year first and i had to keep using the space bar to move down to the lastest content for current date. How can i view the lastest... (3 Replies)
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
I was just thinking if there is a way where i can dynamically rename files based on the actual file content.
I have a load of pdf's which have been named wrongly. (We normally put date first, then brief description, then title)
So can a script be written wherin, it pulls out the date and title... (2 Replies)
hi all,
i have some file whoes contents are
0 /home8/mc09ats/UnixCw/a1
1 /home8/mc09ats/UnixCw/a2
2 /home8/mc09ats/b3
3 /home8/mc09ats/UnixCw/d1
i want to seperate the content following way...
fileindex= 0
filepath=... (4 Replies)
Hi..
I have some content as
Hello how are you?
Where are you?
i need the above content to be placed in a file called hello.sh
So,when i execute a file called hi.sh it should automatically create the file hello.sh and write the above content into it. I know to create a file using touch... (4 Replies)
Hello Guys
I have a directory of xml files (almost 500 ) Now in each xml file 3 new attributes will be added which are in a different single file
Is there any way I can copy the whole content of single file at 6th line of all the files in the directory .
Thanks a lot!!! (7 Replies)
HI All,
I have a file with content as below
Filename:
my name is xyz
my name abc
my name is bdf
end
Filename:
my name uvx
my name edd
my name jhn
end
i want to edit the content and save into another file as
Filename1:
my name is xyz
Filename1:
my name abc
Filename1:
my name is... (4 Replies)
I'm looking for a bash scrypt to copy some folders and some of the content to another location. I'm a teacher and very noobish with programming language anyway what I'm looking for , I have this director structure
Main director "Students" with subfolders "john";"daisy";"work" etc .. and some of... (2 Replies)
I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)