add_server.cpp

来自「ESOAP是一款专注于嵌入式web service开发的工具 压缩包里提供了基」· C++ 代码 · 共 64 行

CPP
64
字号
// AUTO GENERATED ( copied from "AddTwo_impl.cpp" ).
#include "AddTwo_impl.h"

/* must be the last include */
#ifdef MEMWATCH
#include <memwatch.h>
#endif

namespace sample {

int AddTwo_Impl::add( const int a, const int b )
{
   return a + b;
}

}
// AUTO GENERATED END.

// ---------------------------------------------------------


/////////////////////////////////////////////////////////////////////////////
// $Id: add_server.cpp,v 1.2 2001/09/18 13:34:41 rosimildo Exp $
//
// Copyright (c) 2001 Exor International Inc. All rights reserved.
//
// MODULE DESCRIPTION: A simple "Add two integers" example for eSoap.
//
// MODIFICATION/HISTORY:
//
// $Log: add_server.cpp,v $
// Revision 1.2  2001/09/18 13:34:41  rosimildo
// A few cleanups of the new examples: addtwo and get_temp
//
// Revision 1.1  2001/09/18 00:07:54  rosimildo
// Added two more examples: add_two  and get_temp.
//
//
// Created 2001/09/10 Rosimildo da Silva, ConnectTel Inc.
// [rdasilva@connecttel.com]
//
/////////////////////////////////////////////////////////////////////////////
#include "soap_server.h"

int main(int, char ** )
{
  // create the server instance, and initialize it.
  esoap::ServerFactory::create( esoap::ServerFactory::ABYSS );
  esoap::Server::instance()->init( "eSOAPServer", 8080, ".", 0, true );

  // Create "AddTwo" instance, and register it with the server
  sample::AddTwo_Impl add;
  add.activate();

  // start the server...
  esoap::Server::instance()->run();

  // shutdown server.
  add.deactivate();
  esoap::Server::setInstance( 0 );
  return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?