aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--osmo/OsmoAppConnection.st14
1 files changed, 7 insertions, 7 deletions
diff --git a/osmo/OsmoAppConnection.st b/osmo/OsmoAppConnection.st
index cf789a4..b1647e2 100644
--- a/osmo/OsmoAppConnection.st
+++ b/osmo/OsmoAppConnection.st
@@ -84,7 +84,14 @@ TODO: re-use the IPADispatcher across connections.'>
initializeDispatcher [
"Allow another class to register handlers"
+ dispatcher := IPADispatcher new.
+ dispatcher initialize.
connect_block ifNotNil: [connect_block value: dispatcher].
+ ipa := (IPAProtoHandler new)
+ registerOn: dispatcher;
+ muxer: muxer;
+ token: token;
+ yourself
]
nextPut: aData [
@@ -129,14 +136,7 @@ TODO: re-use the IPADispatcher across connections.'>
writeQueue := SharedQueue new.
demuxer := IPADemuxer initOn: socket.
muxer := IPAMuxer initOn: writeQueue.
- dispatcher := IPADispatcher new.
- dispatcher initialize.
self initializeDispatcher.
- ipa := (IPAProtoHandler new)
- registerOn: dispatcher;
- muxer: muxer;
- token: token;
- yourself
]
start [