Appearance
class flake::ConnectionImpl
#include </Users/ios_developer/workspace/coldwave-os/build/_deps/flake-src/protocol/ClientConnection.h>
Inherits from flake::Transport, flake::Connection, flake::ConnectedObjectImpl, flake::WireConnectionSink, ClientObjectRegistry, flake::ConnectedObject, flake::IndicationSink, flake::ConfirmationSink
Public Functions
| Name | |
|---|---|
| ConnectionImpl(Wire * w, ConnectionSink * s, AuthenticationSink * a =[nullptr]) | |
| virtual ConnectionImpl * | impl() override |
| virtual [int] | connect(AuthenticationSink * authentication_sink) override |
| virtual [int] | connect(PropArray & props) override |
| virtual [bool] | connected() override Connect to the router. |
| virtual [void] | disconnect() override Disconnect from the router. |
| virtual [int] | queryObjects([uniqueId_t] type, Object ** objects, [int] maxCount) override |
| virtual [int] | registerObject(ObjectDelegate * srv, [uniqueId_t] & uuid, [bool] requires_auth) override |
| virtual [int] | unregisterObject([addr_t] id) |
| virtual [uint16_t] | getMTU() const override |
| [bool] | ownsObject([addr_t] object_addr) |
| [int] | subscribeObject(ObjectImpl * o, [const] std::function< [void]([const]Indication &)> & f) |
| [int] | unsubscribeObject(ObjectImpl * o) |
| [int] | sendMessageSync(Message * message, ConfirmationSink * sink =[nullptr], [uint32_t] timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS) |
| [int] | sendMessageAsync(Message * message, ConfirmationSink * sink =[nullptr], [uint32_t] timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS) |
| virtual [void] | unref() override |
| virtual [void] | ref() override |
| [int] | validateMessage([addr_t] src, [addr_t] dst, [uint32_t] messageType) |
Protected Functions
| Name | |
|---|---|
| virtual | ~ConnectionImpl() override |
| virtual [void] | onWireUnavailable() override |
| virtual [void] | onWireConnect() override |
| virtual [void] | onWireDisconnect() override |
| virtual [void] | onConfirmation([const]Confirmation & confirmation) override |
| virtual [void] | onIndication([const]Indication & indication) override |
| [int] | sessionConnect() |
| [void] | reset() |
| [void] | shutdown() |
Additional inherited members
Public Functions inherited from flake::Transport
| Name | |
|---|---|
| [int] | sendRequest(Message * message, ConfirmationSink * sink, [uint32_t] timeout_ms, [bool] wait) |
| [int] | sendIndication(Message * message, ResponseSink * sink, [uint32_t] timeout_ms, ResponseContext * ctx =[nullptr]) |
| [int] | reply(Message * message) |
| [void] | processResponse(Message * message) |
| Message * | receive() |
| [TransportState] | state() const |
| Wire * | wire() const |
| [int] | startup() |
| [uint32_t] | lastMessageTimestamp() const |
| [void] | linkServerConnection(ServerConnection * c) |
| ServerConnection * | linkedServerConnection() const |
| virtual [void] | setMTU([uint16_t] mtu) |
Protected Functions inherited from flake::Transport
| Name | |
|---|---|
| Transport(Wire * w, WireConnectionSink * wireSink, [ThreadQueue]< Message * > * inQueue, ServerConnection * serverConnection) | |
| virtual | ~Transport() override |
Friends inherited from flake::Transport
| Name | |
|---|---|
| [class] | Router(Router ) |
| [class] | Message(Message ) |
Protected Functions inherited from flake::Connection
| Name | |
|---|---|
| virtual | ~Connection() =default |
Public Functions inherited from flake::ConnectedObjectImpl
| Name | |
|---|---|
| ConnectedObjectImpl(ConnectionImpl * conn) | |
| virtual | ~ConnectedObjectImpl() override =default |
| virtual [addr_t] | addr() const override |
| virtual [addr_t] | broadcastAddr() const override |
| virtual [addr_t] | parentAddr() const override |
| ConnectionImpl * | connection() const |
Protected Functions inherited from flake::ConnectedObjectImpl
| Name | |
|---|---|
| [void] | setParentAddr([addr_t] addr) |
| [void] | setAddr([addr_t] addr) |
| [void] | setBroadcastAddr([addr_t] addr) |
Protected Attributes inherited from flake::ConnectedObjectImpl
| Name | |
|---|---|
| PropArray | m_properties |
Friends inherited from flake::ConnectedObjectImpl
| Name | |
|---|---|
| [class] | ObjectImpl(ObjectImpl ) |
Public Functions inherited from flake::WireConnectionSink
| Name | |
|---|---|
| virtual | ~WireConnectionSink() =default |
Public Functions inherited from flake::ConnectedObject
| Name | |
|---|---|
| virtual [addr_t] | addr() const =0 |
| virtual [addr_t] | broadcastAddr() const =0 |
| virtual [addr_t] | parentAddr() const =0 |
Protected Functions inherited from flake::ConnectedObject
| Name | |
|---|---|
| ~ConnectedObject() =default |
Protected Functions inherited from flake::IndicationSink
| Name | |
|---|---|
| ~IndicationSink() =default |
Protected Functions inherited from flake::ConfirmationSink
| Name | |
|---|---|
| ~ConfirmationSink() =default |
Public Functions Documentation
function ConnectionImpl
cpp
ConnectionImpl(
Wire * w,
ConnectionSink * s,
AuthenticationSink * a =nullptr
)function impl
cpp
virtual ConnectionImpl * impl() overrideReimplements: flake::Connection::impl
function connect
cpp
virtual int connect(
AuthenticationSink * authentication_sink
) overrideReturn: E_OK if the connection has been established or an error if it failed
Reimplements: flake::Connection::connect
Establish a connection to the router
function connect
cpp
virtual int connect(
PropArray & props
) overrideReimplements: flake::Connection::connect
function connected
cpp
virtual bool connected() overrideConnect to the router.
Reimplements: flake::Connection::connected
function disconnect
cpp
virtual void disconnect() overrideDisconnect from the router.
Reimplements: flake::Connection::disconnect
function queryObjects
cpp
virtual int queryObjects(
uniqueId_t type,
Object ** objects,
int maxCount
) overrideParameters:
- type the type of the service (the service-class)
- objects array of objects, allocated by the caller
- maxCount max number of objects in the buffer
Return: total number of objects
Reimplements: flake::Connection::queryObjects
Queries the router for existing service-objects. it is important to call 'unref()' on any returned object, that the caller doesn't want to use
function registerObject
cpp
virtual int registerObject(
ObjectDelegate * srv,
uniqueId_t & uuid,
bool requires_auth
) overrideParameters:
- srv
- uuid
- requires_auth
Return:
Reimplements: flake::Connection::registerObject
function unregisterObject
cpp
virtual int unregisterObject(
addr_t id
)function getMTU
cpp
virtual uint16_t getMTU() const overrideReimplements: flake::Transport::getMTU
function ownsObject
cpp
bool ownsObject(
addr_t object_addr
)function subscribeObject
cpp
int subscribeObject(
ObjectImpl * o,
const std::function< void(constIndication &)> & f
)function unsubscribeObject
cpp
int unsubscribeObject(
ObjectImpl * o
)function sendMessageSync
cpp
int sendMessageSync(
Message * message,
ConfirmationSink * sink =nullptr,
uint32_t timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS
)Takes Ownership of message and releases internally. Caller must use message after call.
function sendMessageAsync
cpp
int sendMessageAsync(
Message * message,
ConfirmationSink * sink =nullptr,
uint32_t timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS
)Takes Ownership of message and releases internally. Caller must use message after call.
function unref
cpp
inline virtual void unref() overridefunction ref
cpp
inline virtual void ref() overridefunction validateMessage
cpp
static int validateMessage(
addr_t src,
addr_t dst,
uint32_t messageType
)Protected Functions Documentation
function ~ConnectionImpl
cpp
virtual ~ConnectionImpl() overridefunction onWireUnavailable
cpp
virtual void onWireUnavailable() overrideReimplements: flake::Transport::onWireUnavailable
function onWireConnect
cpp
virtual void onWireConnect() overrideReimplements: flake::Transport::onWireConnect
function onWireDisconnect
cpp
virtual void onWireDisconnect() overrideReimplements: flake::Transport::onWireDisconnect
function onConfirmation
cpp
virtual void onConfirmation(
constConfirmation & confirmation
) overrideParameters:
- confirmation
Reimplements: flake::ConnectedObjectImpl::onConfirmation
function onIndication
cpp
virtual void onIndication(
constIndication & indication
) overrideParameters:
- indication
Reimplements: flake::ConnectedObjectImpl::onIndication
function sessionConnect
cpp
int sessionConnect()function reset
cpp
void reset()function shutdown
cpp
void shutdown()