![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
cscj365
这个作者很懒,什么都没留下…
展开
-
基于TCP的聊天程序(了不起的nodejs chapter6)
var net = require('net');var count = 0, users = {};var server = net.createServer(function(conn) { var nickname; console.log('new Connection'); conn.write( '> welcome to node-chat \n >原创 2014-08-21 15:04:04 · 316 阅读 · 0 评论 -
请求时间过长进行提醒的中间件(了不起的nodejs chapter 8)
/**request-time.js*/module.exports = function(opts) { var time = opts.time || 100; return function(req, res, next) { var timer = setTimeout(function() { console.log('%s %s taking too原创 2014-08-22 11:07:51 · 544 阅读 · 0 评论