moss-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Moss-devel] CVS: moss/rmc/src/Transport/SSL Makefile.am,NONE,1.1 Transp


From: Alexander Feder <address@hidden>
Subject: [Moss-devel] CVS: moss/rmc/src/Transport/SSL Makefile.am,NONE,1.1 TransportClientSSLSocket.cxx,NONE,1.1 TransportServerSSLSocket.cxx,NONE,1.1
Date: Sun, 23 Jun 2002 09:27:52 -0400

Update of /cvsroot/moss/moss/rmc/src/Transport/SSL
In directory subversions:/tmp/cvs-serv2212/src/Transport/SSL

Added Files:
        Makefile.am TransportClientSSLSocket.cxx 
        TransportServerSSLSocket.cxx 
Log Message:
added rmc


--- NEW FILE ---
lib_LTLIBRARIES = libRMCTransportServerSSLSocket.la 
libRMCTransportClientSSLSocket.la

CXXFLAGS = -Wall -g -O2

INCLUDES=-I../../../include

libRMCTransportServerSSLSocket_la_LDFLAGS = --export-dynamic
libRMCTransportServerSSLSocket_la_SOURCES = TransportServerSSLSocket.cxx
libRMCTransportServerSSLSocket_la_LIBADD = ../libRMCTransportServer.la 
../libRMCTransportClientHandler.la 
#                                        
../../family/Socket/SSLSocket/libSSLSocket.la \
#                                        
../../family/Socket/SSLSocket/libSSLSocketNamed.la \
#                                        
../../family/Socket/SSLSocket/libSSLSocketUnNamed.la -lssl


libRMCTransportClientSSLSocket_la_LDFLAGS = --export-dynamic
libRMCTransportClientSSLSocket_la_SOURCES = TransportClientSSLSocket.cxx
libRMCTransportClientSSLSocket_la_LIBADD = ../libRMCTransportClient.la -lssl
#                                        
../../family/Socket/SSLSocket/libSSLSocket.la \
#                                        
../../family/Socket/SSLSocket/libSSLSocketUnNamed.la -lssl


--- NEW FILE ---
/***************************************************************************
                        TransportClientSSLSocket.cxx -  description
                           -------------------
    begin                : Fri October 5 2001
    copyright            : (C) 2001 Peter Soetens
    email                : address@hidden

 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *                                                                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place Suite 330,                                            *
 *   Boston, MA  02111-1307, USA.                                          *
 *                                                                         *
 ***************************************************************************/

#include "Transport/TransportClientSSLSocket.h"
#include "Transport/SSLSocketUnNamed.h"

using namespace family;

CTransportClientSSLSocket::CTransportClientSSLSocket()
    :CTransportClientSocket()
{
        SSLInit();
}

LONG CTransportClientSSLSocket::Connect()
{
      cout <<"CTransportClientSSLSocket::Connect()"<<endl;
      m_poTransportBufferClient = new CSSLSocketUnNamed();
      ((CSSLSocketUnNamed*)m_poTransportBufferClient)->Connect( m_sAddress, 
m_nPort );
      // check_cert(ssl,host);
      return 1;
}

--- NEW FILE ---
 /***************************************************************************
                                                TransportServerSSLSocket.cxx  - 
 description
                           -------------------
    begin                : Fri October 4 2001
    copyright            : (C) 2001 by Peter Soetens
    email                : address@hidden

 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *                                                                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place Suite 330,                                            *
 *   Boston, MA  02111-1307, USA.                                          *
 *                                                                         *
 ***************************************************************************/

#include "generic.h"
#include "Transport/TransportServerSSLSocket.h"
#include "Transport/SSLSocketNamed.h"

using namespace rmc;
using namespace family;

CTransportServerSSLSocket *g_poTransportServerSSLSocket = new 
CTransportServerSSLSocket(6666);

extern "C"
    {
    void RegisterRmcServer ( CRmcServer *poRmcServer );
    }

/***************************************************************************
 *
 *  Construction/Destruction
 *
 */

CTransportServerSSLSocket::CTransportServerSSLSocket (int nPort)
    : CTransportServerSocket()
  {
  TRACE("CTransportServerSSLSocket::CTransportServerSSLSocket\n")

  m_poSocketServer = new CSSLSocketNamed();
  ((CSSLSocketNamed*)m_poSocketServer)->Bind(nPort);
  ((CSSLSocketNamed*)m_poSocketServer)->Listen(32);
  } // CTransportServerSocket::CTransportServerSocket (int nPrt)

CTransportServerSocket::~CTransportServerSocket ( )
  {
  cout << "CTransportServerSocket Destructor" << endl;

  } // CTransportServerSocket::~CTransportServerSocket ( )
/***************************************************************************
 *
 *  public Methods
 *
 */


int CTransportServerSSLSocket::WaitForClient ( )
  {
  TRACE("CTransportServerSSLSocket::WaitForCLient\n")

  while (1)
    {
    // should become the unnamed interface ???
    // createTransport()
    // getTransport()
    // ....
    CSSLSocketUnNamed* poSocketClient = ((CSSLSocketNamed 
*)m_poSocketServer)->WaitForClient();
    if ( poSocketClient == 0 )
          {
      break;
          }
    // one ClientHandler per socket
    CClientHandler* poClientHandler = new CClientHandler ( poSocketClient, 
m_poRmcServer );
    TRACE("whats up?")
    poClientHandler->Start();
/*    m_moSocket2Client[poSocketClient->FdGet()] = new CClientHandler ( 
poSocketClient, &m_poRmcServer );
    m_moSocket2Client[poSocketClient->FdGet()]->Start(); */
    TRACE("Got a Client..")

        } // while (1)

  return 0;
  }; // int CTransportServerSocket::WaitForClient ( )

void CTransportServerSocket::RemoveClient(int fd)
  {
  CMapSocket2Client::iterator it = m_moSocket2Client.find(fd);

  if (it == m_moSocket2Client.end() )
    {
    return;
    } // if (it == m_moSocket2Client.end() )

// ?? what is with the "fd" in "it" ?

  m_moSocket2Client.erase(it);

  } // void CTransportServerSocket::RemoveClient(int fd)

// this export (the only export for this library) gets the
// address of the object that loaded this library and is
// interested in the service of it
extern "C"
  {
  void RegisterRmcServer ( CRmcServer *poRmcServer )
    {
    g_poTransportServerSSLSocket->RegisterRmcServer(poRmcServer);
    } // void RegisterRmcServer ( CRmcServer *poRmcServer )
  } // extern "C"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]