I'm doing chat system with nodejs
. To create a node server I can either use net
or http
module. So what is the difference and benefit of using each of them ?
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Google Apps Script: testing doPost() with cURL
- How to instantiate Http service in main.ts manuall
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- Is a unicode user agent legal inside an HTTP heade
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
http
is built on top ofnet
(which handles the TCP layer underlying HTTP).I imagine that your "chat system" will have browser-based clients, since node.js isn't great for GUIs/desktop apps at the moment. If that's the case, you'll most likely want to use
http
.A node.js chat server has already been made - node-chat. You could build yours on top of this, or take a look at its source code for some ideas.