Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-22 04:59:47 +03:00
parent 80e25fe45c
commit 577c514ba2

View File

@ -61,15 +61,23 @@ var PeerActions = actions.Actions({
function(name){ function(name){
return !!this.getActionAttr(name, '__peer__') }], return !!this.getActionAttr(name, '__peer__') }],
//
// The overloading action should connect on the pre-stage...
//
// XXX should this be sync or async???
// XXX this should create or connect to a peer depending on protocol... // XXX this should create or connect to a peer depending on protocol...
// XXX the events should get called on the peer too -- who is
// responsible for this???
peerConnect: ['- Peer/', peerConnect: ['- Peer/',
function(id, options){ function(id, options){
// XXX id in this.__peers
&& this.peerConnected(id)
return id return id
}], }],
peerDisconnect: ['- Peer/', peerDisconnect: ['- Peer/',
function(id){ function(id){
// XXX !(id in this.__peers)
&& this.peerDisconnected(id)
}], }],
// event... // event...