client.cpp 291 B

123456789101112131415161718192021222324
  1. #include <time.h>
  2. #include "log.h"
  3. #include "message_file.h"
  4. int main()
  5. {
  6. message_file mf(stdin);
  7. unsigned char b[2048];
  8. char m[2048];
  9. uint64_t time=0;
  10. int len;
  11. while((len=mf.get_line(&time,(char*)b,sizeof(b),m))>0)
  12. {
  13. mf.put_line(stdout,time,(char*)b,len);
  14. }
  15. return 0;
  16. }