In addition to the "parameter is incorrect" error which I inquired about earlier (and remains unsolved), I am getting "End of file" sometimes when I attempt to receive data such as in the code below. Please offer some guidance as to its cause, because there is absolutely no documentation on what either of these errors mean.

char reply[1024];
boost::system::error_code error;
size_t reply_length = s.receive(boost::asio::buffer(reply, 1024), 0, error);
if (error) cout << error.message() << endl;