#ifndef COSY_MTcpIpIO
#define COSY_MTcpIpIO

#ifndef COSY_MThread
#include "MThread.h"
#endif
#ifndef COSY_Log
#include "log.h"
#endif

class TString;
class TSocket;
class TServerSocket;

class MTcpIpIO : public MThread, public Log
{
private:
    TSocket       *fTxSocket;
    TSocket       *fRxSocket;
    TServerSocket *fServSock;

    void Clear();

public:
    MTcpIpIO(MLog &out=gLog);
    ~MTcpIpIO();

    virtual bool Send(const char *msg);
    virtual bool InterpreteStr(TString str);

    void *Thread();
};

#endif
