Hi,

I am trying to retrieve a bitstream from a server using the following command:

int RecvBytes=recv(Socket,buf,100,0);

Now the RecvBytes has a result of 20 which means 20 bytes a returned but in buf I have just 2 strange char.

I need the binary of all the received packet. As, the RecvBytes has 20 Bytes value, I should get 20*8=160 bits but recvbuf has 2 strange variables, casting it to int and converting ASCII value to bits give me just 2*8=16 bits.

How can I get all 160 bits instead of 16 bits?

Thank you.