SocketThreadBase add design pattern