This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
NetworkStream Members
Public:
Constructor
Properties
CanRead |
Indicates that data can be read from the stream. |
CanSeek |
Indicates that the stream can seek a specific location in the stream. This property always returns false. |
CanWrite |
Indicates that data can be written to the stream. |
DataAvailable |
Indicates data is available on the stream to be read. |
Length |
The length of data available on the stream. Always throws System..NotSupportedException. |
Position |
Gets or sets the position in the stream. Always throws System..NotSupportedException. |
Methods
BeginRead |
Begins an asychronous read from a stream. |
BeginWrite |
Begins an asynchronous write to a stream. |
Close |
Closes the stream, and then closes the underlying socket. |
EndRead |
Handle the end of an asynchronous read. |
EndWrite |
Handle the end of an asynchronous write. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
Flush |
Flushes data from the stream. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType (inherited from Object) |
Gets the Type of the Object. |
Read |
Reads data from the stream. |
ReadByte (inherited from Stream) |
Reads a byte from the current position in the stream, or-1 if at the end of the stream. |
Seek |
Seeks a specific position in the stream. This method is not supported by the System.Net.Socket..NetworkStream class. |
SetLength |
Sets the length of the stream. Always throws System..NotSupportedException. |
ToString (inherited from Object) |
Returns a String that represents the current Object. |
Write |
Writes data to the stream.. |
WriteByte (inherited from Stream) |
Writes a byte to the current position in the stream.
If the stream is closed or not writable, an exception will be thrown.
|
Protected:
Methods
CreateWaitHandle (inherited from Stream) |
Allocates a WaitHandle object efficiently. |
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
Fields
m_Readable |
Used by the class to indicate that the stream is readable. |
m_StreamSocket |
Used by the class to hold the underlying socket the stream uses. |
m_Writeable |
Used by the class to indicate that the stream is writable. |
See Also
NetworkStream Class | System.Net.Sockets Namespace