CARLA
Public Member Functions | Private Types | Private Attributes | List of all members
carla::streaming::Server Class Reference

A streaming server. More...

#include <Server.h>

+ Collaboration diagram for carla::streaming::Server:

Public Member Functions

void AsyncRun (size_t worker_threads)
 
void CloseStream (carla::streaming::detail::stream_id_type id)
 
auto GetLocalEndpoint () const
 
carla::streaming::detail::token_type GetToken (carla::streaming::detail::stream_id_type sensor_id)
 
Stream MakeStream ()
 
void Run ()
 
 Server (uint16_t port)
 
 Server (const std::string &address, uint16_t port)
 
 Server (const std::string &address, uint16_t port, const std::string &external_address, uint16_t external_port)
 
void SetSynchronousMode (bool is_synchro)
 
void SetTimeout (time_duration timeout)
 
 ~Server ()
 

Private Types

using protocol_type = low_level::Server< detail::tcp::Server >::protocol_type
 
using underlying_server = low_level::Server< detail::tcp::Server >
 

Private Attributes

ThreadPool _pool
 
underlying_server _server
 

Detailed Description

A streaming server.

Each new stream has a token associated, this token can be used by a client to subscribe to the stream.

Definition at line 21 of file streaming/Server.h.

Member Typedef Documentation

◆ protocol_type

Definition at line 23 of file streaming/Server.h.

◆ underlying_server

Definition at line 22 of file streaming/Server.h.

Constructor & Destructor Documentation

◆ Server() [1/3]

carla::streaming::Server::Server ( uint16_t  port)
inlineexplicit

Definition at line 26 of file streaming/Server.h.

◆ Server() [2/3]

carla::streaming::Server::Server ( const std::string &  address,
uint16_t  port 
)
inlineexplicit

Definition at line 29 of file streaming/Server.h.

◆ Server() [3/3]

carla::streaming::Server::Server ( const std::string &  address,
uint16_t  port,
const std::string &  external_address,
uint16_t  external_port 
)
inlineexplicit

Definition at line 32 of file streaming/Server.h.

◆ ~Server()

carla::streaming::Server::~Server ( )
inline

Definition at line 40 of file streaming/Server.h.

References _pool, and carla::ThreadPool::Stop().

+ Here is the call graph for this function:

Member Function Documentation

◆ AsyncRun()

void carla::streaming::Server::AsyncRun ( size_t  worker_threads)
inline

Definition at line 64 of file streaming/Server.h.

References _pool, and carla::ThreadPool::AsyncRun().

+ Here is the call graph for this function:

◆ CloseStream()

void carla::streaming::Server::CloseStream ( carla::streaming::detail::stream_id_type  id)
inline

Definition at line 56 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::CloseStream().

+ Here is the call graph for this function:

◆ GetLocalEndpoint()

auto carla::streaming::Server::GetLocalEndpoint ( ) const
inline

Definition at line 44 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::GetLocalEndpoint().

+ Here is the call graph for this function:

◆ GetToken()

carla::streaming::detail::token_type carla::streaming::Server::GetToken ( carla::streaming::detail::stream_id_type  sensor_id)
inline

Definition at line 72 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::GetToken().

Referenced by FCarlaServer::FPimpl::BindActions(), and FCarlaEngine::NotifyInitGame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeStream()

Stream carla::streaming::Server::MakeStream ( )
inline

Definition at line 52 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::MakeStream().

+ Here is the call graph for this function:

◆ Run()

void carla::streaming::Server::Run ( )
inline

Definition at line 60 of file streaming/Server.h.

References _pool, and carla::ThreadPool::Run().

+ Here is the call graph for this function:

◆ SetSynchronousMode()

void carla::streaming::Server::SetSynchronousMode ( bool  is_synchro)
inline

Definition at line 68 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::SetSynchronousMode().

Referenced by FCarlaServer::FPimpl::BindActions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTimeout()

void carla::streaming::Server::SetTimeout ( time_duration  timeout)
inline

Definition at line 48 of file streaming/Server.h.

References _server, and carla::streaming::low_level::Server< T >::SetTimeout().

+ Here is the call graph for this function:

Member Data Documentation

◆ _pool

ThreadPool carla::streaming::Server::_pool
private

Definition at line 80 of file streaming/Server.h.

Referenced by AsyncRun(), Run(), and ~Server().

◆ _server

underlying_server carla::streaming::Server::_server
private

The documentation for this class was generated from the following file: