IrDAClient Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides connection services for an infrared connection.

Namespace:  System.Net.Sockets
Assembly:  System.Net.IrDA (in System.Net.IrDA.dll)

type IrDAClient =  class end

This class provides services for an infrared endpoint that includes making connections, obtaining data streams, and discovering devices.

Because of protocol differences, you cannot interactively use the infrared beam features on a Pocket PC with a .NET Compact Framework infrared application. Protocol differences also exist with the built-in infrared features on a laptop or desktop computer.

Infrared connections are made by specifying a service name, which can be any value, provided the participating devices refer the same name.

How to: Make an Infrared File Transfer.NET Compact Framework
How to: Make an Infrared File Transfer.NET Compact Framework
How to: Make an Infrared File Transfer.NET Compact Framework

The following example demonstrates how to send files between devices that use infrared communications. You need two Pocket PCs, one to send the file and the other to receive it. To run this sample, do the following:

  1. Build the example.

  2. Create a text file that is named send.txt in the My Documents folder of the device that will send the file.

  3. Align the infrared ports of the devices.

  4. On both devices, start the IrDADemo.exe application.

  5. On both devices, click Discover for a list of infrared devices within range.

  6. On the device that will receive the file, select the device that will send the file, and then click Receive. You must click this button before you click Send on the sending device.

  7. On the device that will send the file, click the Send button.

The receiving device will receive the file, and the file's contents will be saved to a file named receive.txt in the My Documents folder.

No code example is currently available or this language may not be supported.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0