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'>
|
||||
<comment: 'I am a hub and one can register handlers for the streams'>
|
||||
|
||||
IPADispatcher class >> new [
|
||||
<category: 'creation'>
|
||||
^ super new
|
||||
initialize;
|
||||
yourself
|
||||
]
|
||||
|
||||
initialize [
|
||||
<category: 'initialize'>
|
||||
<category: 'private'>
|
||||
handlers := Dictionary new.
|
||||
]
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ Eval [
|
|||
muxer := IPAMuxer initOn: socket.
|
||||
|
||||
dispatcher := IPADispatcher new.
|
||||
dispatcher initialize.
|
||||
|
||||
ipa := IPAProtoHandler new.
|
||||
dispatcher addHandler: IPAConstants protocolIPA on: ipa with: #handleMsg:.
|
||||
|
|
Reference in New Issue