aboutsummaryrefslogtreecommitdiffstats
path: root/osmo
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-27 08:42:50 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-27 16:23:05 +0100
commitdd54429310a6041c3a8f9ca20f04b1d1ded79ae6 (patch)
tree126de616ecf0185fe13d37ddfe8344724edee162 /osmo
parenta47c76fc1bce5bd9ea80133624826ce24a14ece6 (diff)
osmo: Add a way to set the token on the connection
Diffstat (limited to 'osmo')
-rw-r--r--osmo/OsmoAppConnection.st17
1 files changed, 12 insertions, 5 deletions
diff --git a/osmo/OsmoAppConnection.st b/osmo/OsmoAppConnection.st
index 75fd214..268044a 100644
--- a/osmo/OsmoAppConnection.st
+++ b/osmo/OsmoAppConnection.st
@@ -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 [