Share via


NetworkStream Members

The following tables list the members exposed by the NetworkStream type.

Public Constructors

Name Description
Public Method NetworkStream Overloaded. Creates a new instance of the NetworkStream class.

Protected Fields

Name Description
Protected Field _disposed Indicates whether the NetworkStream has been disposed.
Protected Field _remoteEndPoint Contains the stream's remote endpoint.

Public Properties

Name Description
Public Property CanRead Gets a value that indicates whether the NetworkStream supports reading.
Public Property CanSeek Gets a value that indicates whether the stream supports seeking.
Public Property CanTimeout Gets a value that determines whether the current stream can time out.
Public Property CanWrite Gets a value indicating whether the current stream supports writing.
Public Property DataAvailable Gets a Boolean value indicating whether the stream has available data.
Public Property Length Gets the length in bytes of the stream.
Public Property Position Gets or sets the position within the current stream
Public Property ReadTimeout Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property WriteTimeout Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

Public Methods

Name Description
Public Method Close Closes the NetworkStream after waiting the specified time to allow data to be sent.
Public Method Close (Inherited from Stream.)
Public Method Dispose (Inherited from Stream.)
Public Method Equals (Inherited from Object.)
Public Method Flush Flushes data from the stream.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Read Reads data from the NetworkStream.
Public Method ReadByte (Inherited from Stream.)
Public Method ReferenceEquals (Inherited from Object.)
Public Method Seek Sets the current position of the stream to the given value.
Public Method SetLength Sets the length of the stream.
Public Method ToString (Inherited from Object.)
Public Method Write Writes data to the NetworkStream.
Public Method WriteByte (Inherited from Stream.)

Protected Methods

Name Description
Protected Method Dispose Releases the unmanaged resources used by the NetworkStream and optionally releases the managed resources.
Protected Method Finalize (Inherited from Stream.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

NetworkStream Class
System.Net.Sockets Namespace