IrDAClientClient Property
Gets or sets the underlying
Socket.
Namespace: InTheHand.Net.SocketsAssembly: InTheHand.Net.IrDA (in InTheHand.Net.IrDA.dll) Version: 4.0.2+5cdf1cfd21064ea31c5de33d160200ca1c4bc218
public Socket Client { get; set; }
Public Property Client As Socket
Get
Set
public:
property Socket^ Client {
Socket^ get ();
void set (Socket^ value);
}
member Client : Socket with get, set
Property Value
Socket
This is particularly useful as it allows setting socket
options, for instance IrCOMM Cooked mode, ie
NineWireMode.
Example code to connect to a IrCOMM service would be as
follows, note the use of the Client property.
Public Shared Sub Main()
Dim cli As New IrDAClient
' Set IrCOMM Cooked/9-wire mode.
cli.Client.SetSocketOption( _
IrDASocketOptionLevel.IrLmp, _
IrDASocketOptionName.NineWireMode, _
1) ' representing true
' Connect
cli.Connect("IrDA:IrCOMM")
' Connected, now send and receive e.g. by using the
' NetworkStream returned by cli.GetStream
...
End Sub