Typically used together with CustomMsgServerDelegate e.g. to ensure a matching interface. Subclasses represent a connection of a custom server.
More...
#include <objectbox-sync.hpp>
|
| AbstractCustomMsgConnection (uint64_t serverId, uint64_t id=0) |
|
virtual | ~AbstractCustomMsgConnection ()=default |
|
uint64_t | serverId () const |
|
uint64_t | id () const |
|
void | setId (uint64_t id) |
|
virtual void | close ()=0 |
| The connection closing itself (to be implemented by concrete subclass). More...
|
|
virtual void | shutdown ()=0 |
| The connection shall shutdown; e.g. it may delete itself. Note that there is no "automatic" deletion triggered from the custom msg system: often, connections are intertwined with the server and thus deletion must be managed at the implementing side. More...
|
|
virtual bool | sendAsync (BytesLazy &&message)=0 |
| Offers bytes to be sent asynchronously to the client (to be implemented by concrete subclass). More...
|
|
virtual void | clearOutgoingMessages ()=0 |
| Clear all outgoing messages (to be implemented by concrete subclass). More...
|
|
Typically used together with CustomMsgServerDelegate e.g. to ensure a matching interface. Subclasses represent a connection of a custom server.
◆ AbstractCustomMsgConnection()
obx::AbstractCustomMsgConnection::AbstractCustomMsgConnection |
( |
uint64_t |
serverId, |
|
|
uint64_t |
id = 0 |
|
) |
| |
|
inlineexplicit |
◆ ~AbstractCustomMsgConnection()
virtual obx::AbstractCustomMsgConnection::~AbstractCustomMsgConnection |
( |
| ) |
|
|
virtualdefault |
◆ clearOutgoingMessages()
virtual void obx::AbstractCustomMsgConnection::clearOutgoingMessages |
( |
| ) |
|
|
pure virtual |
◆ close()
virtual void obx::AbstractCustomMsgConnection::close |
( |
| ) |
|
|
pure virtual |
◆ id()
uint64_t obx::AbstractCustomMsgConnection::id |
( |
| ) |
const |
|
inline |
◆ sendAsync()
virtual bool obx::AbstractCustomMsgConnection::sendAsync |
( |
BytesLazy && |
message | ) |
|
|
pure virtual |
Offers bytes to be sent asynchronously to the client (to be implemented by concrete subclass).
- Parameters
-
message | the message bytes. |
- Returns
- true if the operation was successful.
-
false in case the operation encountered an issue.
Implemented in obx::CustomMsgConnectionDelegate.
◆ serverId()
uint64_t obx::AbstractCustomMsgConnection::serverId |
( |
| ) |
const |
|
inline |
◆ setId()
void obx::AbstractCustomMsgConnection::setId |
( |
uint64_t |
id | ) |
|
|
inline |
◆ shutdown()
virtual void obx::AbstractCustomMsgConnection::shutdown |
( |
| ) |
|
|
pure virtual |
The connection shall shutdown; e.g. it may delete itself. Note that there is no "automatic" deletion triggered from the custom msg system: often, connections are intertwined with the server and thus deletion must be managed at the implementing side.
Implemented in obx::CustomMsgConnectionDelegate.