Develop and Download Open Source Software

Browse Subversion Repository

Contents of /connection/ConnectionLogger.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 191 - (show annotations) (download) (as text)
Fri Jan 4 02:49:36 2008 UTC (16 years, 3 months ago) by satofumi
File MIME type: text/x-chdr
File size: 1229 byte(s)
using namespace beego

1 #ifndef CONNECTION_LOGGER_H
2 #define CONNECTION_LOGGER_H
3
4 /*!
5 \file
6 \brief 通信の記録
7
8 \author Satofumi KAMIMURA
9
10 $Id$
11 */
12
13 #include "ConnectionInterface.h"
14 #include <SDL_net.h>
15 #include <memory>
16
17 class SocketSet;
18
19
20 namespace beego {
21 /*!
22 \brief 送受信データの記録クラス
23 */
24 class ConnectionLogger : public ConnectionInterface {
25 ConnectionLogger(void);
26 ConnectionLogger(const ConnectionLogger& rhs);
27 ConnectionLogger& operator = (const ConnectionLogger& rhs);
28
29 struct pImpl;
30 const std::auto_ptr<pImpl> pimpl;
31
32 public:
33 ConnectionLogger(ConnectionInterface* con, bool open_logfile = false);
34 ~ConnectionLogger(void);
35
36 const char* what(void);
37 bool connect(const char* host, long port);
38 void disconnect(void);
39 bool isConnected(void);
40 bool changeBaudrate(long baudrate);
41 int send(const char* data, int size);
42 int recv(char* data, int size, int timeout);
43 int size(int timeout = 0);
44 void clear(void);
45 void skip(int total_timeout);
46 void flush(void);
47
48 /*!
49 \brief ログの出力ファイル名を設定
50
51 \param logfileName [i] ログの出力ファイル名
52 */
53 void setLogfileName(const char* logfileName);
54 };
55 };
56
57 #endif /* !CONNECTION_LOGGER_H */

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26