In The Hand
GetStream Method
NamespacesInTheHand.Net.SocketsBluetoothClientGetStream()()()
.NET Components for Mobility
Gets the underlying stream of data.
Declaration Syntax
C#Visual Basic
public NetworkStream GetStream()
Public Function GetStream As NetworkStream
Return Value
The underlying NetworkStream.
Remarks
GetStream()()() returns a NetworkStream that you can use to send and receive data. The NetworkStream class inherits from the Stream class, which provides a rich collection of methods and properties used to facilitate network communications.

You must call the Connect(BluetoothEndPoint) / [M:Connect(InTheHand.Net.BluetoothAddress,System.Guid)] method first, or the GetStream()()() method will throw an InvalidOperationException. After you have obtained the NetworkStream, call the Write(array<Byte>[]()[], Int32, Int32) method to send data to the remote host. Call the Read(array<Byte>[]()[], Int32, Int32) method to receive data arriving from the remote host. Both of these methods block until the specified operation is performed. You can avoid blocking on a read operation by checking the DataAvailable property. A true value means that data has arrived from the remote host and is available for reading. In this case, Read(array<Byte>[]()[], Int32, Int32) is guaranteed to complete immediately. If the remote host has shutdown its connection, Read(array<Byte>[]()[], Int32, Int32) will immediately return with zero bytes.

Exceptions
ExceptionCondition
InvalidOperationExceptionThe BluetoothClient is not connected to a remote host.
ObjectDisposedExceptionThe BluetoothClient has been closed.

Assembly: InTheHand.Net.Personal (Module: InTheHand.Net.Personal) Version: 3.0.0.0