KjPerlServer.h

Go to the documentation of this file.
00001 
00013 /***************************************************************************
00014  *   Copyright (C) 2007 by Jan Koci   *
00015  *   honza.koci@email.cz   *
00016  *   http://kengine.sourceforge.net/tutorial/
00017  *                                                                         *
00018  *   This program is free software; you can redistribute it and/or modify  *
00019  *   it under the terms of the GNU General Public License as published by  *
00020  *   the Free Software Foundation; either version 2 of the License, or     *
00021  *   (at your option) any later version.                                   *
00022  *                                                                         *
00023  *   This program is distributed in the hope that it will be useful,       *
00024  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00025  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00026  *   GNU General Public License for more details.                          *
00027  *                                                                         *
00028  *   You should have received a copy of the GNU General Public License     *
00029  *   along with this program; if not, write to the                         *
00030  *   Free Software Foundation, Inc.,                                       *
00031  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00032  ***************************************************************************/
00033 
00034 // Generate doxygen main page
00060 #pragma once
00061 
00062 
00063 #include <vector>
00064 #include <iostream>
00065 using namespace std;
00066 
00067 #ifdef do_open
00068 #undef do_open
00069 #endif
00070 
00071 #ifdef do_close
00072 #undef do_close
00073 #endif
00074 
00075 
00076 #include "../KjSslSocket/KjDefines.h"
00077 #include "../KjSslSocket/KjSslServer.h"
00078 #include "../KjSslSocket/KjSslConnection.h"
00079 #include "../KjSslSocket/KjSignal.h"
00080 #include "../KjSslServer/KjServerThread.h"
00081 
00082 extern "C" 
00083 {
00084         #include <EXTERN.h>
00085         #include <perl.h>
00086 }
00087 
00088 class KjPerlServer
00089 {
00090 private:
00091         KjServerThread *m_pServer;
00092         string m_strReadMsg;            
00093         string m_strWriteMsg;           
00094 public:
00095         KjPerlServer();
00096         ~KjPerlServer();
00097 
00098         bool CanRead(const int _iClientId);
00099         const char *Read(const int _iClientId);
00100         void Write(const int _iClientId, const char* _strMsg);
00101         int GetNumClients();
00102         void Connect(char* _strConn, const char* _strCertFile,const char* _strKeyFile);
00103         int Start();
00104 };
00105 

Generated on Tue Jul 24 10:03:42 2007 for KjPerlServer by  doxygen 1.4.6