#ifndef TLSServerSocket_h__
#define TLSServerSocket_h__

#include "Socket.h"
#include "TCPServer.h"
#include "Command.h"
#include "TCPSession.h"
#include "IPAddress.h"

namespace core {
   
   ///
   /// TLSServer
   ///
   /// Manage a socket connection as a TLS server type. Connections to the socket are processed through
   /// the accept functionality. 
   ///
   
   class TLSServer : public TCPServer {
      
    public:
      
      ///
      /// The constructor.
      ///
      /// @param ePoll the BMAEPoll instance that manages the socket.
      /// @param url the IP address for the socket to receive connection requests.
      /// @param port the port number that the socket will listen on.
      /// @param commandName the name of the command used to invoke the status display for this object.
      /// @return the instance of the BMATLSServerSocket.
      
      TLSServer(EPoll &ePoll, IPAddress address);
      
      ///
      /// The destructor for this object.
      ///
      
      ~TLSServer(); 

      TCPSession * getSocketAccept();

      SSL_CTX *ctx;   
            
    private:

      char *sip_cacert = (char *)"../testkeys/certs/pbxca.crt";
      char *sip_cert = (char *)"../testkeys/certs/pbxserver.crt";
      char *sip_key = (char *)"../testkeys/certs/pbxserver.key";
      
   };
   
}

#endif
