MeVisLab Toolbox Reference
TcpAcceptorSession.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3
4#pragma once
5
6#include <asio/System.h>
8#include <asio/TcpAcceptor.h>
9#include <asio/TcpSocket.h>
10
11
12namespace asio {
13
34 {
36
37 TcpAcceptorSession(std::shared_ptr<Context> context, const std::string& address, const unsigned short port);
38
39 public:
40
41 unsigned short port() const;
42
43 void start();
44
45 void stop();
46
47 private:
48
49 void accept();
50
51 std::shared_ptr<Context> context;
52
53 TcpAcceptor acceptor;
54 };
55
56}
#define ASYNCHRONOUSIO_EXPORT
Definition System.h:10
Class template facilitating the definition of asio::Socket generators.
A TCP acceptor session continuously waiting for incoming connections.
unsigned short port() const
A TCP acceptor listening on a given port and interface address.
Definition TcpAcceptor.h:40
Target mlrange_cast(Source arg)
Generic version of checked ML casts.