Server class handling incoming connections from remote frameworks.
More...
#include <fw/RemoteServer.h>
Server class handling incoming connections from remote frameworks.
◆ RemoteServer()
Constructs a server that listens on the given port.
◆ ~RemoteServer()
Destructor. Stops server.
◆ handleAccept()
void handleAccept |
( |
const boost::system::error_code & |
error | ) |
|
Connection handler.
Gets called when a client connects.
- Parameters
-
◆ startListening()
◆ run()
void run |
( |
std::size_t |
threadCount = 0 , |
|
|
bool |
runInThisThread = true |
|
) |
| |
Runs the server with the given number of threads.
- Note
- When using TCPAsyncConnection as connection class, all clients will get the same underlying io_service object. This means all clients share the same thread(s). Keep in mind to start with more threads if you expect many connections at a time.
- Parameters
-
[in] | threadCount | The number of threads to launch |
[in] | runInThisThread | If true this method will block until the server stops. |
◆ stop()
◆ getPort()
Returns the port of the server.
◆ mService
◆ mAcceptor
boost::asio::ip::tcp::acceptor mAcceptor |
|
protected |
◆ mPendingConnection
The documentation for this class was generated from the following file: