[connect] add package

This commit is contained in:
2020-03-25 21:02:51 +03:00
parent fe60e78b74
commit 4017df4d00
17 changed files with 796 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
package hw.connect.fake;
import promhx.Promise;
import protohx.Message;
class FakeConnection<O:Message, I:Message> extends BaseConnection<O, I> {
override public function connect():Promise<IConnection<O, I>> {
handler.emit(ConnectionEvent.CONNECTED);
var promise:Promise<IConnection<O, I>> = cast Promise.promise(this);
return promise;
}
override public function disconnect():Void {
handler.emit(ConnectionEvent.DISCONNECTED);
}
}