GSSCommand *cmd;
int len;
ssize_t readTotal, readThisRound, readRemaining;
- std::streamsize threeTwoBits = 32 / sizeof(string::size_type);
/* Error checking */
response.set("error_message", "Did not find a valid method to execute.");
output = response.dump();
len = output.length();
- cout.write((char *)&len, threeTwoBits);
+ cout.write((char *)&len, 4);
cout << output << endl;
continue;
}
response.set("error_message", "Did not find a valid method to execute.");
output = response.dump();
len = output.length();
- cout.write((char *)&len, threeTwoBits);
+ cout.write((char *)&len, 4);
cout << output << endl;
continue;
output = result->dump();
len = output.length();
- cout.write((char *)&len, threeTwoBits);
+ cout.write((char *)&len, 4);
cout << output;
cout.flush();
response.set("error", error);
output = response.dump();
len = output.length();
- cout.write((char *)&len, threeTwoBits);
+ cout.write((char *)&len, 4);
cout << output << endl;
}
} while(1);