~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/demo/Ice/interleaved/Server.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// **********************************************************************
 
2
//
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
4
//
 
5
// This copy of Ice is licensed to you under the terms described in the
 
6
// ICE_LICENSE file included in this distribution.
 
7
//
 
8
// **********************************************************************
 
9
 
 
10
#include <Ice/Ice.h>
 
11
#include <ThroughputI.h>
 
12
 
 
13
using namespace std;
 
14
 
 
15
class ThroughputServer : public Ice::Application
 
16
{
 
17
public:
 
18
 
 
19
    virtual int run(int, char*[]);
 
20
};
 
21
 
 
22
int
 
23
main(int argc, char* argv[])
 
24
{
 
25
    ThroughputServer app;
 
26
    return app.main(argc, argv, "config.server");
 
27
}
 
28
 
 
29
int
 
30
ThroughputServer::run(int argc, char* argv[])
 
31
{
 
32
    if(argc > 1)
 
33
    {
 
34
        cerr << appName() << ": too many arguments" << endl;
 
35
        return EXIT_FAILURE;
 
36
    }
 
37
 
 
38
    Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Throughput");
 
39
    Demo::ThroughputPtr servant = new ThroughputI;
 
40
    adapter->add(servant, communicator()->stringToIdentity("throughput"));
 
41
    adapter->activate();
 
42
    communicator()->waitForShutdown();
 
43
    return EXIT_SUCCESS;
 
44
}