Ignore:
Timestamp:
11/21/11 13:08:27 (13 years ago)
Author:
tbretz
Message:
Implemented a new class MTcpIpFact using a duplex communication for FACT
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosy/tcpip/MTcpIpIO.h

    r10031 r12598  
    2020class MTcpIpI : public MThread
    2121{
     22protected:
     23    TSocket *fRxSocket;
     24    TMutex   fRxMutex;
     25
    2226private:
    2327    Int_t  fPortRx;     // Port on which to listen for connections
     
    3640
    3741public:
    38     MTcpIpI(Int_t rx, UInt_t timeout=5000) : MThread(Form("MTcpIpI::%d", rx)), fPortRx(rx), fTimeout(timeout), fConnectionEstablished(kFALSE) { /*RunThread();*/ }
     42    MTcpIpI(Int_t rx, UInt_t timeout=5000) : MThread(Form("MTcpIpI::%d", rx)), fRxSocket(0), fPortRx(rx), fTimeout(timeout), fConnectionEstablished(kFALSE) { /*RunThread();*/ }
    3943    ~MTcpIpI() { CancelThread(); }
    4044
     
    6569};
    6670
    67 // This class es espcially meant to receive and send ascii messages
    68 class MTcpIpIO : public MTcpIpI, public MTcpIpO
     71class MTcpIpCC : public MTcpIpI
    6972{
    7073private:
     
    7275
    7376public:
    74     MTcpIpIO(const char *addr, Int_t tx, Int_t rx, UInt_t timeout=5000);
     77    MTcpIpCC(Int_t rx, UInt_t timeout=5000);
    7578
    7679    virtual bool InterpreteStr(TString str);
     80};
     81
     82// This class es espcially meant to receive and send ascii messages
     83class MTcpIpIO : public MTcpIpCC, public MTcpIpO
     84{
     85
     86public:
     87    MTcpIpIO(const char *addr, Int_t tx, Int_t rx, UInt_t timeout=5000);
    7788};
    7889
     
    91102};
    92103
     104class MTcpIpFact : public MTcpIpCC
     105{
     106private:
     107
     108public:
     109    MTcpIpFact(const char *dumm1, Int_t dummy2, Int_t rx, UInt_t timeout) : MTcpIpCC(rx, timeout)
     110    {
     111    }
     112
     113    bool Send(const char *msg, int len);
     114};
     115
     116
    93117#endif
Note: See TracChangeset for help on using the changeset viewer.