There's more...
You could create multiple sessions for the same channel. To do so, in step 3, open another terminal console for the VM and start the echo server a second time, but on a different port:
- $ java -jar EchoServer.jar -t true -p 2008.
- Create a channel specifying this port using step 4.
- Send the request to see the channel. See the request sent at step 5.
The response will this time contain two sessions:
--[cut]--
"session": [
{
"session-id": "2",
"bytes-in": 0,
"termination-point": {
"termination-point-id": "2008"
},
"session-alarms": 0,
"bytes-out": 0
},
{
"session-id": "1",
"bytes-in": 0,
"termination-point": {
"termination-point-id": "2007"
},
"session-alarms": 0,
"bytes-out": 0
}
]
--[cut]--
You can have as many sessions as you wish per channel. This means you can have a number of devices running on the same host and you can connect to each one of them using the same secured channel.
推薦閱讀
- 零基礎學C++程序設計
- LabVIEW Graphical Programming Cookbook
- Ray分布式機器學習:利用Ray進行大模型的數(shù)據(jù)處理、訓練、推理和部署
- Gradle for Android
- Webpack實戰(zhàn):入門、進階與調優(yōu)
- Java面向對象程序設計
- Linux Shell核心編程指南
- Everyday Data Structures
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- Photoshop智能手機APP界面設計
- Java高手是怎樣煉成的:原理、方法與實踐
- Mastering Leap Motion
- HTML5與CSS3權威指南
- Apache Solr for Indexing Data
- Learning Azure DocumentDB