这是我的读取函数
handle_input (ACE_HANDLE handle)
{
ACE_UNUSED_ARG (handle);
size_t n = 64;
char buf[64];
ACE_OS::memset (buf, 0, sizeof buf);
ACE_Time_Value t = ACE_Time_Value::zero;
ssize_t ret = this->peer ().recv (buf, n, &t);
if ( ret <= 0) {
ACE_ERROR_RETURN ((LM_ERROR, "%M [%t %N:%l] Failed to get any byte from socket\n"), -1);
}
time_t now = time (0);
#ifdef BCR_DEBUG_ENABLE
ACE_DEBUG ((LM_DEBUG, "%M [%t %N:%l] reviece message:\n%s\nTime: %s", buf, ctime (&now)));
#endif
//If it has read any from the connection for some time, I would disconnect it.
this->last_read_time = now;
/**
If recive the Second servers ip, and if it is valid ip replace the old which was gotten form the connection with it
*/