| Line | |
|---|
| 1 | #ifndef COSY_MTcpIpIO
|
|---|
| 2 | #define COSY_MTcpIpIO
|
|---|
| 3 |
|
|---|
| 4 | #ifndef COSY_MThread
|
|---|
| 5 | #include "MThread.h"
|
|---|
| 6 | #endif
|
|---|
| 7 | #ifndef COSY_Log
|
|---|
| 8 | #include "log.h"
|
|---|
| 9 | #endif
|
|---|
| 10 | #ifndef MARS_MTime
|
|---|
| 11 | #include "MTime.h"
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | class TString;
|
|---|
| 15 | class TSocket;
|
|---|
| 16 | class TServerSocket;
|
|---|
| 17 |
|
|---|
| 18 | class MTcpIpIO : public MThread, public Log
|
|---|
| 19 | {
|
|---|
| 20 | private:
|
|---|
| 21 | TSocket *fTxSocket;
|
|---|
| 22 | TSocket *fRxSocket;
|
|---|
| 23 | TServerSocket *fServSock;
|
|---|
| 24 |
|
|---|
| 25 | MTime fTime;
|
|---|
| 26 | Int_t fSendInterval; // [ms]
|
|---|
| 27 |
|
|---|
| 28 | void Clear();
|
|---|
| 29 |
|
|---|
| 30 | public:
|
|---|
| 31 | MTcpIpIO(MLog &out=gLog);
|
|---|
| 32 | ~MTcpIpIO();
|
|---|
| 33 |
|
|---|
| 34 | virtual bool Send(const char *msg);
|
|---|
| 35 | virtual bool InterpreteStr(TString str);
|
|---|
| 36 |
|
|---|
| 37 | void *Thread();
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.