Basic TCP socket stuff base on redis anet source