#ifndef __TCPSocket_h__
#define __TCPSocket_h__

#include "IPAddress.h"
#include "Socket.h"
#include "includes"

namespace core {

   ///
   /// TCPSocket
   ///
   /// Provides a network TCP socket.
   ///
   /// For accessing TCP network functions use this object. The connection oriented nature of TCP
   /// provides a single client persistent connection with data error correction and a durable
   /// synchronous data connection.
   ///

   class TCPSocket : public Socket {

   public:
      TCPSocket(EPoll &ePoll);
      TCPSocket(EPoll &ePoll, std::string text);
      virtual ~TCPSocket();

      void connect(IPAddress &address);

      IPAddress ipAddress;

      ///
      /// The output method is called by a socket session (TCPSession) and
      /// will output the detail information for the client socket. When extending
      /// BMATCPSocket or BMASession you can override the method to add attributes
      /// to the list.
      ///

      virtual void output(std::stringstream &out);
   };

}

#endif
