--- projects/cms/source/host/c++/SmallNet.h 2001/01/24 19:33:23 1.1 +++ projects/cms/source/host/c++/SmallNet.h 2002/05/18 18:15:56 1.6 @@ -1,6 +1,26 @@ +/* + * i-scream central monitoring system + * Copyright (C) 2000-2002 i-scream + * + * 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 #include -#include "libnet/net_util.h" +#include "socket++-1.10/sockinet.h" +#include "SubNet.h" using std::string; @@ -8,18 +28,21 @@ class SmallNet { public: // constructor - SmallNet(); + SmallNet(int printDebug); // heartbeat section int connectHeartBeat(string host, int port); string heartBeatSend(string text); - void closeHeartBeatConnection(); + void closeHeartBeatConnection(); // config section - int connectConfig(); + int connectConfig(string host,int port); string configSend(string text); void closeConfigConnection(); // misc stuff - void sendUDPPacket(string xml); - string getIPfromHost(string hostname); + void sendUPDPacket( string host, int port, string message ); private: + + int debug; // print debug info? + iosockinet * socket; // TCP socket + SubNet * ssocket; // TCP/UDP Socket }; // class \ No newline at end of file