source: trunk/MagicSoft/Mars/mbase/MReadSocket.h@ 2454

Last change on this file since 2454 was 2386, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 772 bytes
Line 
1#ifndef MARS_MReadSocket
2#define MARS_MReadSocket
3
4#ifndef ROOT_TROOT
5#include <TROOT.h>
6#endif
7#ifndef ROOT_TTime
8#include <TTime.h>
9#endif
10
11#include <iostream> // base classes for MReadSocket
12
13class TSocket;
14class TServerSocket;
15
16class MReadSocket : public std::streambuf, public std::istream
17{
18private:
19 char *fBuffer; //!
20
21 int fMtu;
22 TTime fTimeout;
23
24 TServerSocket *fServSock;
25 TSocket *fRxSocket;
26
27 int underflow();
28 int sync();
29
30public:
31 MReadSocket(int port, int mtu=1500);
32 MReadSocket(MReadSocket const& log) : istream((std::streambuf*)&log)
33 {
34 }
35 ~MReadSocket();
36
37 void SetTimeout(UInt_t millisec) { fTimeout = millisec; }
38
39 ClassDef(MReadSocket, 0) // This is what we call 'The logging system'
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.