NegotiateStream.BeginWrite メソッド
アセンブリ: System (system.dll 内)

Public Overrides Function BeginWrite ( _ buffer As Byte(), _ offset As Integer, _ count As Integer, _ asyncCallback As AsyncCallback, _ asyncState As Object _ ) As IAsyncResult
Dim instance As NegotiateStream Dim buffer As Byte() Dim offset As Integer Dim count As Integer Dim asyncCallback As AsyncCallback Dim asyncState As Object Dim returnValue As IAsyncResult returnValue = instance.BeginWrite(buffer, offset, count, asyncCallback, asyncState)
public override IAsyncResult BeginWrite ( byte[] buffer, int offset, int count, AsyncCallback asyncCallback, Object asyncState )
public: virtual IAsyncResult^ BeginWrite ( array<unsigned char>^ buffer, int offset, int count, AsyncCallback^ asyncCallback, Object^ asyncState ) override
public IAsyncResult BeginWrite ( byte[] buffer, int offset, int count, AsyncCallback asyncCallback, Object asyncState )
public override function BeginWrite ( buffer : byte[], offset : int, count : int, asyncCallback : AsyncCallback, asyncState : Object ) : IAsyncResult
戻り値
非同期操作のステータスを示す IAsyncResult オブジェクト。


暗号化、署名、または暗号化と署名が有効になっている場合、このメソッドが、バッファからのデータの読み込み、読み込んだデータの暗号化、署名、または暗号化と署名、および基になるストリームを使用したデータの送信を行います。データの暗号化や署名などのセキュリティ サービスが使用されていない場合、このメソッドは基になるストリームで非同期の書き込み操作を開始します。
このメソッドは、非同期で実行され、操作の実行中にブロックしません。操作が完了するまでブロックするには、Read メソッドを使用します。
非同期読み取り操作は、EndWrite メソッドを呼び出して終了させる必要があります。通常、このメソッドは asyncCallback デリゲートによって呼び出されます。非同期プログラミング モデルの使用法の詳細については、「同期メソッドの非同期呼び出し」を参照してください。
NegotiateStream クラスは、複数の書き込み操作の同時実行をサポートしていません。同じストリームで既に書き込み操作が実行中であるときに、別の書き込み操作を開始しようとすると、NotSupportedException 例外がスローされます。
このメソッドは、正常に認証されるまで呼び出すことはできません。認証するには、AuthenticateAsClient、BeginAuthenticateAsClient、AuthenticateAsServer、または BeginAuthenticateAsServer のいずれかのメソッドを呼び出します。

// Send a message to the server. // Encode the test data into a byte array. byte[] message = Encoding.UTF8.GetBytes("Hello from the client."); ar = authStream.BeginWrite(message, 0, message.Length, new AsyncCallback(EndWriteCallback), authStream);
// The following method is called when the write operation completes. public static void EndWriteCallback (IAsyncResult ar) { Console.WriteLine("Client ending write operation..."); NegotiateStream authStream = (NegotiateStream) ar.AsyncState; // End the asynchronous operation. authStream.EndWrite(ar); }

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に収録されているすべての辞書からNegotiateStream.BeginWrite メソッドを検索する場合は、下記のリンクをクリックしてください。

- NegotiateStream.BeginWrite メソッドのページへのリンク