Look into socket `close` and `end` events
Look into socket
closeandendevents