RTI Connext Modern C++ API  Version 7.0.0

<<reference-type>> Provides the execution environment for one or more ServiceEndpoint. More...

#include <dds/rpc/Server.hpp>

Public Member Functions

 Server ()
 Creates a new server with default ServerParams. More...
 
 Server (const ServerParams &params)
 Creates a new server with the specified ServerParams. More...
 
void run ()
 Holds the execution of the current thread. More...
 
void run (const dds::core::Duration &max_wait)
 Holds the execution of the current thread for the specified amount of time. More...
 
void close ()
 Forces the destruction of this entity. More...
 

Detailed Description

<<reference-type>> Provides the execution environment for one or more ServiceEndpoint.

Constructor & Destructor Documentation

◆ Server() [1/2]

dds::rpc::Server::Server ( )
inline

Creates a new server with default ServerParams.

◆ Server() [2/2]

dds::rpc::Server::Server ( const ServerParams params)
inlineexplicit

Creates a new server with the specified ServerParams.

Member Function Documentation

◆ run() [1/2]

void dds::rpc::Server::run ( )
inline

Holds the execution of the current thread.

Calling this function is optional. A Server manages a thread pool that runs as soon as a ServiceEndpoint is attached.

◆ run() [2/2]

void dds::rpc::Server::run ( const dds::core::Duration max_wait)
inline

Holds the execution of the current thread for the specified amount of time.

Calling this function is optional. A Server manages a thread pool that runs as soon as a ServiceEndpoint is attached.

Parameters
max_waitThe time to sleep

◆ close()

void dds::rpc::Server::close ( )
inline

Forces the destruction of this entity.

If run() is currently blocked on another thread, close() unblocks it.

Any operation after close() throws dds::core::AlreadyClosedError

MT Safety:
UNSAFE. It is not safe to delete an entity while another thread may be simultaneously calling an API that uses the entity.
See also
Reference types