laryiii / nodechat Goto Github PK
View Code? Open in Web Editor NEWThis project forked from auzll/nodechat
用node.js和websocket来做的聊天室demo
This project forked from auzll/nodechat
用node.js和websocket来做的聊天室demo
初学node.js和html5的相关技术(node方面大部分都是在cnodejs.org上面看技术文章学到的),想着学以致用,于是基于node.js和websocket来做了一个多人聊天室: 一、功能简介 1、用户随意输入一个昵称即可登录 2、登录成功后 1) 对正在登录用户来说,罗列所有在线用户列表,罗列最近的历史聊天记录 2) 对已登录的用户来说,通知有新用户进入房间,更新在线用户列表 3、退出登录 1) 目前未支持直接退出,只能通过关闭网页来退出... 2) 当有用户退出,其他所有在线用户会收到信息,通知又用户退出房间,同时更新在线用户列表 4、聊天 1) 聊天就是广播,把信息广播给所有连接在线的用户 5、一些出错处理 1) 暂时简单处理了系统逻辑错误、网络出错等特殊情况的出错提示 二、参考文章 1、websocket与node.js的完美结合( http://cnodejs.org/blog/?p=273 ) 。从这里了解到node-websocket-server 这个框架的,一个node.js和websocket通讯的框架,本程序中有使用到。 2、nodejs: 真正的一份代码,到处运行( http://cnodejs.org/blog/?p=702 ) 。从这里了解到如何在svr和client中同时复用部分代码,当然,本程序也模仿了这里面的技术来做,例如我源码里面svr/chatLib.js其实是同时被svr和client公用的。 微博交流: http://weibo.com/zhengll
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.