NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

NetworkStream Methods

The methods of the NetworkStream class are listed below. For a complete list of NetworkStream class members, see the NetworkStream Members topic.

Public:

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:

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.

See Also

NetworkStream Class | System.Net.Sockets Namespace