Nodejs uses net module to establish tcp server side. server side accepts data with buffer chunk, and the data will be divided into blocks. I want to call a function to process the data after reading the data.
But I didn’t find the end of the stream.
Note that the event is the end of data flow, not the stop of socket
I still don’t understand what lz wants to do, but net module end event does not represent socket closing, on the contrary, close event represents socket closing. End event will only be triggered when FIN package is received.