add an attribute in tcp client helper to disconnect when everything is written