Answer the question
In order to leave comments, you need to log in
Is the net module analogous to the http module in nodejs?
What are the differences between these modules, I read the documentation and even tried some examples, but they do not work for me. fall out with an error. So the question is - why use the net module if there is http?
Answer the question
In order to leave comments, you need to log in
The net module is a module for low-level networking. For example, if you need to send data using your own protocol via TCP. The HTTP protocol is an upper-level protocol over the TCP protocol, the http module uses the net module.
http protocol.
net network, with which you need to do something yourself, transfer any data, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question