~registry/scalestack/trunk

« back to all changes in this revision

Viewing changes to scalestack/echo/flood/tcp/service.cc

  • Committer: Eric Day
  • Date: 2010-12-04 17:17:34 UTC
  • mfrom: (56.1.9)
  • Revision ID: git-v1:9c392b034d652023a4b28ae2976aca128bb856c2
Merged Eric's branch with style updates, config file support, and other cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Scale Stack
3
 
 *
4
 
 * Copyright (C) 2010 Eric Day (eday@oddments.org)
5
 
 * All rights reserved.
6
 
 *
7
 
 * Use and distribution licensed under the BSD license. See the
8
 
 * COPYING file in the root project directory for full text.
9
 
 */
10
 
 
11
 
/**
12
 
 * @file
13
 
 * @brief Echo Flood TCP Service Definitions
14
 
 */
15
 
 
16
 
#include "config.h"
17
 
 
18
 
#include <scalestack/echo/flood/stream.h>
19
 
#include <scalestack/echo/flood/tcp/service.h>
20
 
 
21
 
namespace scalestack
22
 
{
23
 
namespace echo
24
 
{
25
 
namespace flood
26
 
{
27
 
namespace tcp
28
 
{
29
 
 
30
 
/*
31
 
 * Public functions.
32
 
 */
33
 
 
34
 
service::service(kernel::module& creator):
35
 
  network::ip::tcp::connection_service(creator)
36
 
{
37
 
}
38
 
 
39
 
service::~service()
40
 
{
41
 
  shutdown();
42
 
}
43
 
 
44
 
network::stream* service::add_stream(void)
45
 
{
46
 
  return new stream(*this);
47
 
}
48
 
 
49
 
void service::remove_stream(network::stream* old_stream)
50
 
{
51
 
  delete old_stream;
52
 
}
53
 
 
54
 
} /* namespace tcp */
55
 
} /* namespace flood */
56
 
} /* namespace echo */
57
 
} /* namespace scalestack */