diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-04-29 10:36:21 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-04-29 10:36:21 +0200 |
commit | 189471a5866dbeb80317c8f4c22098da56b6d805 (patch) | |
tree | 9e35febb898bcc13853c347921c364c4f8d73127 | |
parent | 3e8d588e9b7c10d148c9c4a1996017cbeec8e4d9 (diff) |
osmo: Allow a subclass to change the dispatcher/ipa handler
Allow a subclass to overwrite this method to create a custom
handler. So far one could only register additional handlers but
not change the proto handler completely.
-rw-r--r-- | osmo/OsmoAppConnection.st | 14 |
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 [ |