std::ifstream is;
is.open(buff, std::ios::binary);
is.seekg(0, std::ios::end);
num = is.tellg();
is.seekg(0,...
Type: Posts; User: Salem
std::ifstream is;
is.open(buff, std::ios::binary);
is.seekg(0, std::ios::end);
num = is.tellg();
is.seekg(0,...
I've no idea what that error report means.
How To Ask Questions The Smart Way
Use a debugger, or put in some debug "print" statements to find out WHERE it is stuck.
Put in code to check all...
Since you seem to be working in some kind of windows callback / event thing, you first need a static buffer which will persist over time.
Say
static char buff[MAX_SIZE];
Then have two static...
Apart from the awful formatting, and that you're assuming recv() always fills the buffer, I've no idea.
Before trying to store anything, just print things out.
...
> int bytes_read = recv(Socket, recvbuffer, filebuflen, 0 );
This won't hang around until the whole file is received.
The minimum valid success from recv() is just ONE byte....