Answer the question
In order to leave comments, you need to log in
How to close connect via net.createConnection?
I open a connection via net.createConnection,
how can I force it to close?
var client = net.createConnection({ port: 9801, host:'10.31.200.161' });
client end(); - Does not help
Answer the question
In order to leave comments, you need to log in
the end method only sends a FIN packet, the connection will be closed when the other side also sends a FIN packet.
to break the connection unilaterally (without sending anything to the other side), there is a destroy method
https://nodejs.org/dist/latest-v10.x/docs/api/net....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question