Interface for implementing a Sen inter-process transport solution.
More...
#include <transport.h>
|
| | Transport (std::string_view sessionName) |
| | A transport instance is created per connected session (which is unique within a kernel).
|
| virtual | ~Transport ()=default |
| virtual void | start (TransportListener *listener)=0 |
| | Start the message exchange, and set the listener that will react to inputs. This method is non-blocking.
|
| virtual void | sendTo (ParticipantAddr &to, BusId &busId, TransportMode mode, MemBlockPtr data)=0 |
| | Send a message over a bus to a participant using a given mode.
|
| virtual void | sendTo (ParticipantAddr &to, BusId &busId, TransportMode mode, MemBlockPtr data1, MemBlockPtr data2)=0 |
| | Send a compound message (typically header and data) over a bus to a participant using a given mode.
|
| virtual void | localParticipantJoinedBus (ObjectOwnerId participant, BusId bus, const std::string &busName)=0 |
| | Notify other participants that there's a local participant that recently joined a bus.
|
| virtual void | localParticipantLeftBus (ObjectOwnerId participant, BusId bus, const std::string &busName)=0 |
| | Notify other participants that there's a local participant that recently left a bus.
|
| virtual const ProcessInfo & | getOwnInfo () const noexcept=0 |
| | The process info of this process.
|
| virtual void | stop () noexcept=0 |
| | Stop the message exchange.
|
| virtual void | stopIO () noexcept |
| virtual TransportStats | fetchStats () const =0 |
| | Fetch the current statistics.
|
| virtual TimerId | startTimer (std::chrono::steady_clock::duration timeout, std::function< void()> &&timeoutCallback)=0 |
| | Starts an asio asynchronous timer that executes a callback when the steady_clock timeout is reached.
|
| virtual bool | cancelTimer (TimerId id)=0 |
| | Cancels a timer, avoiding its expiration.
|
Interface for implementing a Sen inter-process transport solution.
◆ Transport()
| sen::kernel::Transport::Transport |
( |
std::string_view | sessionName | ) |
|
|
explicit |
A transport instance is created per connected session (which is unique within a kernel).
◆ ~Transport()
| virtual sen::kernel::Transport::~Transport |
( |
| ) |
|
|
virtualdefault |
◆ start()
Start the message exchange, and set the listener that will react to inputs. This method is non-blocking.
◆ sendTo() [1/2]
Send a message over a bus to a participant using a given mode.
◆ sendTo() [2/2]
Send a compound message (typically header and data) over a bus to a participant using a given mode.
◆ localParticipantJoinedBus()
| virtual void sen::kernel::Transport::localParticipantJoinedBus |
( |
ObjectOwnerId | participant, |
|
|
BusId | bus, |
|
|
const std::string & | busName ) |
|
pure virtual |
Notify other participants that there's a local participant that recently joined a bus.
◆ localParticipantLeftBus()
| virtual void sen::kernel::Transport::localParticipantLeftBus |
( |
ObjectOwnerId | participant, |
|
|
BusId | bus, |
|
|
const std::string & | busName ) |
|
pure virtual |
Notify other participants that there's a local participant that recently left a bus.
◆ getOwnInfo()
| virtual const ProcessInfo & sen::kernel::Transport::getOwnInfo |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
The process info of this process.
◆ stop()
| virtual void sen::kernel::Transport::stop |
( |
| ) |
|
|
pure virtualnoexcept |
Stop the message exchange.
◆ stopIO()
| virtual void sen::kernel::Transport::stopIO |
( |
| ) |
|
|
inlinevirtualnoexcept |
◆ fetchStats()
Fetch the current statistics.
◆ startTimer()
| virtual TimerId sen::kernel::Transport::startTimer |
( |
std::chrono::steady_clock::duration | timeout, |
|
|
std::function< void()> && | timeoutCallback ) |
|
pure virtual |
Starts an asio asynchronous timer that executes a callback when the steady_clock timeout is reached.
◆ cancelTimer()
| virtual bool sen::kernel::Transport::cancelTimer |
( |
TimerId | id | ) |
|
|
pure virtual |
Cancels a timer, avoiding its expiration.
The documentation for this class was generated from the following file: