Mono Class Library: System.Net.Sockets.NetworkStream Overview | MembersSystem.Net.Sockets.NetworkStream.EndWrite Method |
Ends an asynchronous call to write data to the current instance. [Edit]
|
- ar
- A IAsyncResult object that holds the state information for the asynchronous operation. [Edit]
Type Reason ArgumentNullException asyncResult is null. [Edit] System.IO.IOException Note: This method catches all exceptions thrown by the Socket.EndSend(IAsyncResult) method.[Edit]ObjectDisposedException The current instance has been disposed. [Edit]
This method blocks if the asynchronous operation has not completed.
The NetworkStream.EndWrite(IAsyncResult) method completes an asynchronous request that was started with a call to the NetworkStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method. The object specified for the asyncResult parameter is required to be the same object as was returned by the NetworkStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method call that began the request.
If the NetworkStream.EndWrite(IAsyncResult) method is invoked via the AsyncCallback delegate specified to the NetworkStream.BeginWrite(Byte[], int, int, AsyncCallback, object) method, the asyncResult parameter is the IAsyncResult argument passed to the delegate's method.
Note:[Edit]This method overrides System.IO.Stream.EndWrite(IAsyncResult).
For an outline of an asynchronous operation, see the Socket.BeginAccept(AsyncCallback, object) method. For the complete example, see the System.Net.Sockets.Socket class overview.
Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0