a LOT of minor stuff
This commit is contained in:
@@ -18,11 +18,13 @@ class Loopback implements INetworkInterface {
|
||||
}
|
||||
|
||||
public function listen(chan:Int) {
|
||||
// TODO
|
||||
if (!this.openChans.contains(chan)){
|
||||
this.openChans.push(chan);
|
||||
}
|
||||
}
|
||||
|
||||
public function close(chan:Int) {
|
||||
// TODO
|
||||
this.openChans.remove(chan);
|
||||
}
|
||||
|
||||
public function isListening(chan:Int):Bool {
|
||||
@@ -34,7 +36,11 @@ class Loopback implements INetworkInterface {
|
||||
}
|
||||
|
||||
public function send(chan:Int, replyChan:Int, payload:Any) {
|
||||
this.onMessageTrigger.trigger(payload);
|
||||
if (this.openChans.contains(chan)){
|
||||
this.onMessageTrigger.trigger(payload);
|
||||
}else{
|
||||
Log.silly("Loopback got package on non open channel");
|
||||
}
|
||||
}
|
||||
|
||||
public function name():String {
|
||||
|
||||
Reference in New Issue
Block a user