趣味で作ってるロボット用ソフトウェア
 All Classes Files Functions Enumerations Enumerator Friends Pages
connection_utils.h
Go to the documentation of this file.
1 #ifndef HRK_CONNECTION_UTILS_H
2 #define HRK_CONNECTION_UTILS_H
3 
9 #include <cstdio>
10 
11 
12 namespace hrk
13 {
14  class Connection;
15 
16  enum {
17  Connection_utils_infinity = -1,
18  Line_feed = EOF,
19  };
20 
21  extern void ignore(Connection* connection, int timeout,
22  int size = Connection_utils_infinity);
23  extern bool ignore_to(Connection* connection, int timeout, char ch);
24 
25  extern int readline(Connection* connection,
26  char* data, int max_data_size, int timeout,
27  int end_ch = Line_feed);
28 }
29 
30 #endif