summaryrefslogtreecommitdiff
path: root/cpp/test/Glacier2/attack/Server.cpp
blob: c70ed62ef4ce6b90498b22c22637428038e17429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

#include <Ice/Ice.h>
#include <TestHelper.h>
#include <BackendI.h>

using namespace std;
using namespace Ice;
using namespace Test;

class BackendServer final : public Test::TestHelper
{
public:

    void run(int, char**) override;
};

void
BackendServer::run(int argc, char** argv)
{
    Ice::CommunicatorHolder communicator = initialize(argc, argv);
    communicator->getProperties()->setProperty("BackendAdapter.Endpoints", getTestEndpoint());
    auto adapter = communicator->createObjectAdapter("BackendAdapter");
    adapter->addDefaultServant(make_shared<BackendI>(), "");
    adapter->activate();
    communicator->waitForShutdown();
}

DEFINE_TEST(BackendServer)