public T Call <T>(ISocketMessage socketMessage) where T : ISocketMessage { T response; using (var socketClient = new SocketClient(_remoteEndpoint)) { socketClient.StartClient(); response = socketClient.Call <T>(socketMessage); socketClient.Shutdown(SocketShutdown.Both); socketClient.Close(); } return(response); }