System.Net.Sockets.NetworkStream Members

The members of System.Net.Sockets.NetworkStream are listed below.

See Also: Inherited members from System.IO.Stream

Public Constructors

Creates a new instance of the System.Net.Sockets.NetworkStream class for the specified System.Net.Sockets.Socket.

Initializes a new instance of the System.Net.Sockets.NetworkStream class for the specified System.Net.Sockets.Socket with the specified System.Net.Sockets.Socket ownership.

Creates a new instance of the System.Net.Sockets.NetworkStream class for the specified System.Net.Sockets.Socket with the specified access rights.

Creates a new instance of the System.Net.Sockets.NetworkStream class for the specified System.Net.Sockets.Socket with the specified access rights and the specified System.Net.Sockets.Socket ownership.

Public Properties

[read-only]
override
CanReadbool.

Gets a value that indicates whether the System.Net.Sockets.NetworkStream supports reading.

[read-only]
override
CanSeekbool.

Gets a value that indicates whether the stream supports seeking. This property is not currently supported.This property always returns false.

[read-only]
override
CanTimeoutbool.

Indicates whether timeout properties are usable for System.Net.Sockets.NetworkStream.

[read-only]
override
CanWritebool.

Gets a value that indicates whether the System.Net.Sockets.NetworkStream supports writing.

[read-only]
DataAvailablebool.

Gets a value that indicates whether data is available on the System.Net.Sockets.NetworkStream to be read.

[read-only]
override
Lengthlong.

Gets the length of the data available on the stream. This property is not currently supported and always throws a NotSupportedException.

override
Positionlong.

Gets or sets the current position in the stream. This property is not currently supported and always throws a NotSupportedException.

override
ReadTimeoutint.

Gets or sets the amount of time that a read operation blocks waiting for data.

override
WriteTimeoutint.

Gets or sets the amount of time that a write operation blocks waiting for data.

Protected Properties

Readablebool.

Gets or sets a value that indicates whether the System.Net.Sockets.NetworkStream can be read.

[read-only]
SocketSocket.

Gets the underlying System.Net.Sockets.Socket.

Writeablebool.

Gets a value that indicates whether the System.Net.Sockets.NetworkStream is writable.

Public Methods

override
BeginRead(byte[], int, int, AsyncCallback, object) : IAsyncResult

Begins an asynchronous read from the System.Net.Sockets.NetworkStream.

override
BeginWrite(byte[], int, int, AsyncCallback, object) : IAsyncResult

Begins an asynchronous write to a stream.

override
Close()

Closes the System.Net.Sockets.NetworkStream.

Close(int)

Closes the System.Net.Sockets.NetworkStream after waiting the specified time to allow data to be sent.

override
EndRead(IAsyncResult) : int

Handles the end of an asynchronous read.

override
EndWrite(IAsyncResult)

Handles the end of an asynchronous write.

Finalize()

Releases all resources used by the System.Net.Sockets.NetworkStream.

override
Flush()

Flushes data from the stream. This method is reserved for future use.

override
Read(byte[], int, int) : int

Reads data from the System.Net.Sockets.NetworkStream.

override
Seek(long, System.IO.SeekOrigin) : long

Sets the current position of the stream to the given value. This method is not currently supported and always throws a NotSupportedException.

override
SetLength(long)

Sets the length of the stream. This method always throws a NotSupportedException.

override
Write(byte[], int, int)

Writes data to the System.Net.Sockets.NetworkStream.

Protected Methods

override
Dispose(bool)

Releases the unmanaged resources used by the System.Net.Sockets.NetworkStream and optionally releases the managed resources.

Explicitly Implemented Interface Members

IDisposable.Dispose

Releases all resources used by the System.Net.Sockets.NetworkStream.