- 继承自: <stream.Duplex>
- Extends: <stream.Duplex>
net.Socket can be created by the user and used directly to interact with
a server. For example, it is returned by
so the user can use it to talk to the server.
It can also be created by Node.js and passed to the user when a connection
is received. For example, it is passed to the listeners of a
'connection' event emitted on a
net.Server, so the user can use
it to interact with the client.