|
-
June 23rd, 2012, 09:43 PM
#6
Re: Retrieving Bit stream from the server through the Socket
[QUOTE=test user;2072641]So, if I use the instruction
int RecvBytes=recv(Socket,buf,100,0);
And now I have 20 bytes received and stored in buf register, what should I do next to retrieve bitstream from buf register?
So you're saying you don't know how to use arrays in C++?
Code:
for (int i = 0; i < 20; ++i)
{
// buf[i] is the i'th character in the buf array
}
I have no clue where the 20 bytes are stored?

You called recv() and you don't know what the second parameter means?
The 20 bytes are:
buf[0], buf[1], buf[2], buf[3], buf[4], ... buf[19].
Also, what do you mean by "buf register"? The buf is an array of bytes, isn't it?
Regards,
Paul McKenzie
Last edited by Paul McKenzie; June 23rd, 2012 at 09:47 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|