SslStream.Flush メソッドとは? わかりやすく解説

SslStream.Flush メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

バッファ格納されデータが基になるデバイス書き込まれるようにします。

名前空間: System.Net.Security
アセンブリ: System (system.dll 内)
構文構文

解説解説
使用例使用例

このメソッド呼び出すコード例次に示します

// Create a TCP/IP client socket.
// machineName is the host running the server application.
TcpClient client = new TcpClient(machineName,443);
Console.WriteLine("Client connected.");
// Create an SSL stream that will close the client's stream.
SslStream sslStream = new SslStream(
    client.GetStream(), 
    false, 
    new RemoteCertificateValidationCallback (ValidateServerCertificate),
 
    null
    );
// The server name must match the name on the server certificate.
try 
{
    sslStream.AuthenticateAsClient(serverName);
} 
catch (AuthenticationException e)
{
    Console.WriteLine("Exception: {0}", e.Message);
    if (e.InnerException != null)
    {
        Console.WriteLine("Inner exception: {0}", e.InnerException.Message);
    }
    Console.WriteLine ("Authentication failed - closing the connection.");
    client.Close();
    return;
}
// Encode a test message into a byte array.
// Signal the end of the message using the "<EOF>".
byte[] messsage = Encoding.UTF8.GetBytes("Hello from the client.<EOF>");
// Send hello message to the server. 
sslStream.Write(messsage);
sslStream.Flush();
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SslStream クラス
SslStream メンバ
System.Net.Security 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SslStream.Flush メソッド」の関連用語

SslStream.Flush メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SslStream.Flush メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS