Export (0) Print
Expand All

IrDAEndPoint Class

Represents an endpoint for an infrared connection.

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

'Declaration
Public Class IrDAEndPoint _
	Inherits EndPoint
'Usage
Dim instance As IrDAEndPoint

You can create an IrDAListener from an IrDAEndPoint, which is established with the device ID and service name.

TopicLocation
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 creates a connection, with the IrDAEndPoint class, to a device and starts listening for infrared communication from that device with the IrDAListener class. This example is part of a larger example provided for the IrDAClient class.

' Create a connection, with the IrDAEndPoint class, 
' for the selected device in the list box. 
' Start listening for incoming requests from 
' that device with an IrDAListener object. 
Try 
    Dim i As Integer = ListBox1.SelectedIndex
    irEndP = New IrDAEndPoint(irDevices(i).DeviceID, irServiceName)
    irListen = New IrDAListener(irEndP)
    irListen.Start()
Catch exSoc As SocketException
    MessageBox.Show("Couldn't listen on service " & irServiceName & ": " _
        & exSoc.ErrorCode)
End Try

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

Community Additions

ADD
Show:
© 2014 Microsoft