Main Page | Class Hierarchy | Class List | File List | Class Members

Listener.h

00001 // Low-level listener methods
00002 // (c) Copyright in 2000-2005 by tacppd team and contributors
00003 // see http://tacppd.org for more information
00004 
00005 //  This program is free software; you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation; either version 2 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License
00016 //  along with this program; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // modifications:
00020 //
00021 
00022 // all comments which start from /** - this is comments for KDoc
00023 //  for classes
00024 //    @short [short description of the class]
00025 //    @author [class author]
00026 //    @version [class version]
00027 //    @see [references to other classes or methods]
00028 //  for methods
00029 //    @see [references]
00030 //    @return [sentence describing the return value]
00031 //    @exception [list the exeptions that could be thrown]
00032 //    @param [name id] [description]    - can be multiple
00033 
00034 #ifndef __LISTENER_H__
00035 #define __LISTENER_H__
00036 
00037 #include "global.h"
00038 
00039 namespace tacpp {
00040 
00041 #define TCP             1
00042 #define UDP             2
00043 #define UDP_MULTICAST   3
00044 #define XMLRPC          4
00045 
00046 // max UDP datagram size
00047 #define MAX_UDP       2048
00048 
00054 class Connect {
00057 //  pthread_mutex_t mutex_;
00060   socklen_t fh_;
00063   struct in_addr addr_;
00066   int port_;
00069   char *bufx_;
00072   int servertype_;
00073  public:
00076   void lock();
00079   void unlock();
00082   Connect(const socklen_t,const int,const char*,const int,const struct in_addr);
00085   ~Connect();
00089   socklen_t getSock();
00093   struct in_addr getAddr();
00097   int getPort();
00101   char *getBuf();
00105   int getServertype();
00106 };
00107 
00108 class Listener_data;
00109 
00110 void AcceptConnection(Listener_data*);
00111 int HandleConnection(void**);
00112 
00113 class ListenerHandlerEnd {};
00114 
00115 };
00116 
00117 #endif //__LISTENER_H__

Generated on Thu Jul 21 23:09:45 2005 for tacppd.kdevelop by doxygen 1.3.5