It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things

WebSocket与Tcp连接

最近做了一个项目,客户端为WebSocket页面,服务器端为Tcp控制台 。将代码贴出来,供需要的参考。

1.服务器端代码

其中服务器的Session使用了第三方插件,为TCP连接。

2.客户端代码如下

适合初学者使用,这里的js脚本可以根据的自己的需要进行扩展

posted @ 2016-09-26 14:35  gbat  阅读(11376)  评论(0编辑  收藏  举报

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things