osmo: Add a way to set the token on the connection
This commit is contained in:
parent
a47c76fc1b
commit
dd54429310
|
@ -17,15 +17,20 @@
|
|||
"
|
||||
|
||||
Object subclass: OsmoAppConnection [
|
||||
| socket writeQueue demuxer muxer dispatcher |
|
||||
| socket writeQueue demuxer muxer dispatcher token |
|
||||
<category: 'OsmoNetwork-Socket'>
|
||||
<comment: 'I connect to a OpenBSC App on the Control Port and wait for
|
||||
TRAPS coming from the server and will act on these.'>
|
||||
TRAPS coming from the server and will act on these.
|
||||
TODO: re-use the IPADispatcher across connections.'>
|
||||
|
||||
initializeDispatcher [
|
||||
"Allow another class to register handlers"
|
||||
]
|
||||
|
||||
token: aToken [
|
||||
token := aToken.
|
||||
]
|
||||
|
||||
createConnection: aHostname port: aPort [
|
||||
<category: 'socket'>
|
||||
^ Sockets.Socket remote: aHostname port: aPort.
|
||||
|
@ -52,9 +57,11 @@ TRAPS coming from the server and will act on these.'>
|
|||
dispatcher initialize.
|
||||
self initializeDispatcher.
|
||||
|
||||
ipa := IPAProtoHandler new.
|
||||
ipa registerOn: dispatcher.
|
||||
ipa muxer: muxer.
|
||||
ipa := IPAProtoHandler new
|
||||
registerOn: dispatcher;
|
||||
muxer: muxer;
|
||||
token: token;
|
||||
yourself.
|
||||
]
|
||||
|
||||
connect [
|
||||
|
|
Reference in New Issue