|
Re: MsgSendv riov question
|
10/28/2014 2:55 PM
post112203
|
Re: MsgSendv riov question
You need to do the SETIOV before the MsgSend.
Sent from my BlackBerry 10 smartphone on the Rogers network.
Original Message
From: Mehdi Karimi
Sent: Tuesday, October 28, 2014 1:59 PM
To: general-community
Reply To: general-community@community.qnx.com
Subject: MsgSendv riov question
I am using MsgSendv and server sends MSgReply like this:
char desc_buf_out[MAX_CHARS_IN_A_LINE];
MsgReply(rcvid, EOK, desc_buf_out, sizeof(desc_buf_out));
My client is looking like this:
iov_t *iovrcv=calloc(1,sizeof(iov_t));
char rcv[1024]={0}
if (MsgSendv(server_coid, iovin_render, 3 , iovrcv, 1 ) == -1)
{
printf("error sending message to server\n");
fprintf( stderr,
"%s: %s\n",
__func__,
strerror( errno ) );
return EXIT_FAILURE;
}
SETIOV (iovrcv + 0, rcv, sizeof(rcv));
printf("iovrcv=%s\n", rcv);
But I get nothing in my rcv buffer?
Can you tell me why and what is the correct way of doing it so I receive my data correctly? I expect to receive string.
_______________________________________________
General
http://community.qnx.com/sf/go/post112199
To cancel your subscription to this discussion, please e-mail general-community-unsubscribe@community.qnx.com
|
|
|
|
Re: MsgSendv riov question
|
10/28/2014 2:57 PM
post112204
|
Re: MsgSendv riov question
I did that too and it did not work, are you sure I am not missing anything?
|
|
|