A WebSocket server. More...
#include <cvb/webstreaming/server.hpp>
Public Member Functions | |
| int | ActiveConnections () const |
| Get the number of active connections. | |
| void | SendSync (const Image &image) |
| Sends an image synchronously. | |
| void | SendAsync (const Image &image) |
| Sends an image asynchronously. | |
| void * | Handle () const noexcept |
| Returns C-API style handle to Server Object. | |
| String | IPAddress () const noexcept |
| Get the IP address of the server. | |
| int | Port () const noexcept |
| Get destination port. | |
Static Public Member Functions | |
| static ServerPtr | Create (const String &ipAddress, int port, const ConverterPtr &converter) |
| Creates a WebSocket server with given converter. | |
| static ServerPtr | Create (const String &ipAddress, int port) |
| Creates a WebSocket server. | |
A WebSocket server.
Server for sending image data.
|
inline |
Get the number of active connections.
| Any | exception derived from std::exception including CvbException. |
Creates a WebSocket server.
| [in] | ipAddress | The IP-Address for the server. Example: 169.254.0.1. |
| [in] | port | The port for the server. Example: 1112 |
| Any | exception derived from std::exception including CvbException. |
Images are not converted before sending (raw).
|
inlinestatic |
Creates a WebSocket server with given converter.
| [in] | ipAddress | The IP-Address for the server. Example: 169.254.0.1. |
| [in] | port | The port for the server. Example: 1112. |
| [in] | converter | The converter to use. |
| Any | exception derived from std::exception including CvbException. |
Images are converted according to the given converter before sending.
|
inlinenoexcept |
Returns C-API style handle to Server Object.
| Does | not throw any exception. |
|
inlinenoexcept |
Get the IP address of the server.
| Does | not throw any exception. |
|
inlinenoexcept |
Get destination port.
| Does | not throw any exception. |
|
inline |
Sends an image asynchronously.
| [in] | image | The image to send. |
| Any | exception derived from std::exception including CvbException. |
The image will be copied/converted and put on a queue. After that the function will return immediately.
|
inline |
Sends an image synchronously.
| [in] | image | The image to send. |
| Any | exception derived from std::exception including CvbException. |
The image will be copied/converted and put on a queue. Once the image was sent the method will return.