SslStream.ReadTimeout プロパティ
アセンブリ: System (system.dll 内)

Dim instance As SslStream Dim value As Integer value = instance.ReadTimeout instance.ReadTimeout = value
/** @property */ public int get_ReadTimeout () /** @property */ public void set_ReadTimeout (int value)
public override function get ReadTimeout () : int public override function set ReadTimeout (value : int)
同期読み取り操作が失敗するまでの時間を指定する Int32。

このプロパティは、基になるストリームの ReadTimeout を呼び出すことによって返される値を返します。このプロパティを設定すると、基になるストリームの ReadTimeout 値が指定した値に設定されます。
基になるストリームが NetworkStream の場合、ReadTimeout はミリ秒単位です。また、読み取り操作がタイムアウトしないように、既定では Infinite に設定されます。

static void ProcessClient (TcpClient client) { // A client has connected. Create the // SslStream using the client's network stream. SslStream sslStream = new SslStream( client.GetStream(), false); // Authenticate the server but don't require the client to authenticate. try { sslStream.AuthenticateAsServer(serverCertificate, false, SslProtocols.Tls, true); // Display the properties and settings for the authenticated stream. DisplaySecurityLevel(sslStream); DisplaySecurityServices(sslStream); DisplayCertificateInformation(sslStream); DisplayStreamProperties(sslStream); // Set timeouts for the read and write to 5 seconds. sslStream.ReadTimeout = 5000; sslStream.WriteTimeout = 5000; // Read a message from the client. Console.WriteLine("Waiting for client message..."); string messageData = ReadMessage(sslStream); Console.WriteLine("Received: {0}", messageData); // Write a message to the client. byte[] message = Encoding.UTF8.GetBytes("Hello from the server.<EOF>"); Console.WriteLine("Sending hello message."); sslStream.Write(message); } 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."); sslStream.Close(); client.Close(); return; } finally { // The client stream will be closed with the sslStream // because we specified this behavior when creating // the sslStream. sslStream.Close(); client.Close(); } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSslStream.ReadTimeout プロパティを検索する場合は、下記のリンクをクリックしてください。

- SslStream.ReadTimeout プロパティのページへのリンク