Socket synchronous multithread