|
@@ -202,7 +202,7 @@ struct sock_client:fd_io,client_ex
|
|
size_t m_opos=0;
|
|
size_t m_opos=0;
|
|
bool m_can_write{false};
|
|
bool m_can_write{false};
|
|
|
|
|
|
- char m_timestamp[8];
|
|
|
|
|
|
+// char m_timestamp[8];
|
|
|
|
|
|
sock_client(io_context&ic,const char*name,int fd,int recv_time_out,int max_package_size)
|
|
sock_client(io_context&ic,const char*name,int fd,int recv_time_out,int max_package_size)
|
|
:fd_io(ic,fd,EV_READ|EV_WRITE)
|
|
:fd_io(ic,fd,EV_READ|EV_WRITE)
|
|
@@ -229,7 +229,7 @@ struct sock_client:fd_io,client_ex
|
|
// m_send_timer.start();
|
|
// m_send_timer.start();
|
|
|
|
|
|
m_b=(char*)malloc(m_size);
|
|
m_b=(char*)malloc(m_size);
|
|
- m_timestamp[0]=0;
|
|
|
|
|
|
+// m_timestamp[0]=0;
|
|
}
|
|
}
|
|
|
|
|
|
~sock_client()
|
|
~sock_client()
|
|
@@ -237,7 +237,7 @@ struct sock_client:fd_io,client_ex
|
|
free(m_b);
|
|
free(m_b);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+#if 0
|
|
bool check_timestamp(const char*time)
|
|
bool check_timestamp(const char*time)
|
|
{
|
|
{
|
|
//秒、分、时、天、周、月、年, 脑残的设计
|
|
//秒、分、时、天、周、月、年, 脑残的设计
|
|
@@ -257,6 +257,7 @@ struct sock_client:fd_io,client_ex
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
int type()
|
|
int type()
|
|
{
|
|
{
|
|
@@ -294,12 +295,12 @@ struct sock_client:fd_io,client_ex
|
|
buf[p++]=(tv.tv_usec/1000)&0xff;
|
|
buf[p++]=(tv.tv_usec/1000)&0xff;
|
|
|
|
|
|
//为防止分站重启时发送上来过大的时间
|
|
//为防止分站重启时发送上来过大的时间
|
|
- m_timestamp[5]=buf[p++]=t->tm_sec;
|
|
|
|
- m_timestamp[4]=buf[p++]=t->tm_min;
|
|
|
|
- m_timestamp[3]=buf[p++]=t->tm_hour;
|
|
|
|
- m_timestamp[2]=buf[p++]=t->tm_mday;
|
|
|
|
- m_timestamp[1]=buf[p++]=t->tm_mon;
|
|
|
|
- m_timestamp[0]=buf[p++]=t->tm_year;
|
|
|
|
|
|
+ buf[p++]=t->tm_sec;
|
|
|
|
+ buf[p++]=t->tm_min;
|
|
|
|
+ buf[p++]=t->tm_hour;
|
|
|
|
+ buf[p++]=t->tm_mday;
|
|
|
|
+ buf[p++]=t->tm_mon;
|
|
|
|
+ buf[p++]=t->tm_year;
|
|
|
|
|
|
uint16_t ccrc=do_crc((unsigned char*)buf+2,10);
|
|
uint16_t ccrc=do_crc((unsigned char*)buf+2,10);
|
|
|
|
|