public static byte[] Conversation(byte[] request) { MemoryStream response = new MemoryStream(); using (TcpClient client = new TcpClient("pkgdsprod.nintendo.co.jp", 12401)) { SslStream sslClient = new SslStream(client.GetStream(), false, delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }); sslClient.AuthenticateAsClient("pkgdsprod.nintendo.co.jp"); sslClient.Write(request, 0, request.Length); sslClient.CopyTo(response); sslClient.Close(); } response.Flush(); byte[] dataResponse = response.ToArray(); int length = BitConverter.ToInt32(dataResponse, 0); AssertHelper.Equals(length, dataResponse.Length); return dataResponse; }