IrDAClientClient Property

Gets or sets the underlying Socket.

Definition

Namespace: InTheHand.Net.Sockets
Assembly: InTheHand.Net.IrDA (in InTheHand.Net.IrDA.dll) Version: 4.0.2+5cdf1cfd21064ea31c5de33d160200ca1c4bc218
C#
public Socket Client { get; set; }

Property Value

Socket

Remarks

This is particularly useful as it allows setting socket options, for instance IrCOMM Cooked mode, ie NineWireMode.

Example

Example code to connect to a IrCOMM service would be as follows, note the use of the Client property.
VB
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

See Also