ipa: Make the IPADispatcher automatically initialize the object
Update the code.
This commit is contained in:
parent
c69c20f9dc
commit
66900c7fe7
|
@ -22,8 +22,15 @@ Object subclass: IPADispatcher [
|
||||||
<category: 'OsmoNetwork-IPA'>
|
<category: 'OsmoNetwork-IPA'>
|
||||||
<comment: 'I am a hub and one can register handlers for the streams'>
|
<comment: 'I am a hub and one can register handlers for the streams'>
|
||||||
|
|
||||||
|
IPADispatcher class >> new [
|
||||||
|
<category: 'creation'>
|
||||||
|
^ super new
|
||||||
|
initialize;
|
||||||
|
yourself
|
||||||
|
]
|
||||||
|
|
||||||
initialize [
|
initialize [
|
||||||
<category: 'initialize'>
|
<category: 'private'>
|
||||||
handlers := Dictionary new.
|
handlers := Dictionary new.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ Eval [
|
||||||
muxer := IPAMuxer initOn: socket.
|
muxer := IPAMuxer initOn: socket.
|
||||||
|
|
||||||
dispatcher := IPADispatcher new.
|
dispatcher := IPADispatcher new.
|
||||||
dispatcher initialize.
|
|
||||||
|
|
||||||
ipa := IPAProtoHandler new.
|
ipa := IPAProtoHandler new.
|
||||||
dispatcher addHandler: IPAConstants protocolIPA on: ipa with: #handleMsg:.
|
dispatcher addHandler: IPAConstants protocolIPA on: ipa with: #handleMsg:.
|
||||||
|
|
Reference in New Issue