#ifndef OTCP_H
#define OTCP_H

#define TCP_BUFFER_LENGTH 65535

class OTcp {
public:
  OTcp();
  virtual ~OTcp();

  int Connect(char * server, int port);
  int Send(char * message);
  int Receive();

  virtual int ProcessMessage(char * message);

protected:
  char * _server;
  int _port;
  int _fd;

  char _buffer[TCP_BUFFER_LENGTH+1];
  int _blength;

  int _rem_bytes;
};

#endif
