Skip to main content

运行

运行hello world

  • 运行服务器:org.tio.study.helloworld.server.HelloServerStarter,控制台应该会打印如下日志:
2018-11-14 20:01:44,567 INFO  org.tio.server.TioServer[158]: 
|----------------------------------------------------------------------------------------|
| Tio gitee address | https://github.com/tywo45/t-io |
| Tio site address | https://tiocloud.com/ |
| Tio version | 3.5.0.v20190822-RELEASE |
| ---------------------------------------------------------------------------------------|
| TioConfig name | hello-tio-server |
| Started at | 2018-11-14 20:01:44 |
| Listen on | 0.0.0.0:6789 |
| Main Class | org.tio.study.helloworld.server.HelloServerStarter |
| Jvm start time | 408 ms |
| Tio start time | 18 ms |
| Pid | 6700 |
|----------------------------------------------------------------------------------------|
  • 运行客户端:org.tio.study.helloworld.client.HelloClientStarter,会有如下日志
2018-11-14 20:04:11 INFO  o.t.c.ConnectionCompletionHandler[101]: connected to 127.0.0.1:6789
收到消息:收到了你的消息,你的消息是:hello world
2018-11-14 20:04:12 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(1p)(15b)
2018-11-14 20:04:14 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(1p)(15b)
2018-11-14 20:04:15 INFO org.tio.client.TioClient[362]: server:127.0.0.1:6789, client:0:0:0:0:0:0:0:0:54739发送心跳包
2018-11-14 20:04:15 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(1p)(15b)
2018-11-14 20:04:16 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(2p)(19b)
2018-11-14 20:04:17 INFO org.tio.client.TioClient[362]: server:127.0.0.1:6789, client:0:0:0:0:0:0:0:0:54739发送心跳包
2018-11-14 20:04:17 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(2p)(19b)
2018-11-14 20:04:19 INFO org.tio.client.TioClient[369]: [1]: curr:1, closed:0, received:(1p)(55b), handled:1, sent:(3p)(23b)
2018-11-14 20:04:20 INFO org.tio.client.TioClient[362]: server:127.0.0.1:6789, client:0:0:0:0:0:0:0:0:54739发送心跳包