00001
00002
00003
00004
00005
00006
00007 #include <iostream>
00008 #include <cstdlib>
00009 #include <string>
00010 #include "ComPlusPlus/ComPlusPlus"
00011
00012 class TestServerClass : public compp::ASrv {
00013
00014 public:
00015 TestServerClass (const std::string & IPAddr, const int p): compp::ASrv (IPAddr,p) {
00016 }
00017
00018 std::string executeTransaction ( const std::string & request, compp::ASrvContext & Context ) {
00019 std::string ret = "This is the result of our server processing.";
00020 return ret;
00021 }
00022 };
00023
00024 int main (int argc, char *argv [] ) {
00025
00026 try {
00027 TestServerClass S ( "0.0.0.0", 5678 ) ;
00028
00029 S.commenceWork();
00030
00031 } catch ( syspp::ComException & e ) {
00032 std::cout << "Exception " << e.what () << "\n";
00033 }
00034 return 0;
00035 }