string ClientSocket::Read(int Length)
{
char Buffer[Length];
int Check = recv(this->Socket, Buffer, Length, NULL);
Buffer[Check] = '\0';
return Buffer;
}
This method should work, but it returns the data, with the first 4 bytes missing for a reason I cannot work out.
Please note that I did have error handling for sockets, but took it out for the sake of this post, I know that that isn't the problem.
Does anybody know what is going on?
Thanks

New Topic/Question
Reply




MultiQuote




|