官术网_书友最值得收藏!

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:

  1. $ java -jar EchoServer.jar -t true -p 2008.
  2. Create a channel specifying this port using step 4.
  3. 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.

主站蜘蛛池模板: 类乌齐县| 砀山县| 沭阳县| 高雄市| 晋州市| 普兰店市| 繁昌县| 南开区| 太白县| 文昌市| 阿荣旗| 盐边县| 蒙山县| 措勤县| 佛山市| 元朗区| 天全县| 阿鲁科尔沁旗| 静乐县| 益阳市| 如东县| 彩票| 盐城市| 淄博市| 京山县| 清苑县| 沈阳市| 木兰县| 邹城市| 牟定县| 延庆县| 东至县| 英山县| 彭山县| 比如县| 德昌县| 贞丰县| 电白县| 铜陵市| 东光县| 通州区|