add closeMethod option for tcpsocket

Change-Id: I3edf79861fa056b416e09266c52f73e92634e2ee