Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Eilemann
authored and
Stefan Eilemann
committed
Jul 6, 2017
1 parent
40e042a
commit c6fb523
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Subscription Monitor {#monitor} | ||
============ | ||
|
||
To enable an application to republish all its state when a new subscriber | ||
connected, we need a way to monitor connection requests. This RFC describes this | ||
feature for this use case, based on zmq_socket_monitor. | ||
|
||
## API | ||
|
||
class Sender | ||
{ | ||
virtual void* getSocket() = 0; | ||
}; | ||
|
||
class Publisher : public Sender {}; | ||
|
||
class Monitor : public Receiver | ||
{ | ||
Monitor( Sender& sender ); | ||
Monitor( Sender& sender, Receiver& shared ); | ||
|
||
virtual notifyNewConnection() {} | ||
// other notifies and params lazy, on use case | ||
}; | ||
|
||
## Examples | ||
|
||
Livre Communicator derives from Monitor and republishes all events on notify. | ||
|
||
|
||
## Implementation | ||
|
||
Monitor installs zmq_socket_monitor() on Sender::getSocket(). Monitor::process() | ||
calls Monitor::notifyNewConnection(). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ RFCs {#rfcs} | |
* @subpage restapi | ||
* @subpage restapi | ||
* @subpage reqrep | ||
* @subpage monitor |