IrDAListener Class
.NET Framework 3.0
Places a socket in a listening state to monitor infrared connections from a specified service or network address.
Namespace: System.Net.Sockets
Assembly: System.Net.IrDA (in system.net.irda.dll)
System.Net.Sockets Namespace
Assembly: System.Net.IrDA (in system.net.irda.dll)
This class monitors a service by specifying a service name or a network address. The listener does not listen until you call the Start method.
The following code example creates a connection, with the IrDAEndPoint class, and starts listening for incoming requests from that device. This code 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 { int i = listBox1.SelectedIndex; irEndP = new IrDAEndPoint(irDevices[i].DeviceID, irServiceName); irListen = new IrDAListener(irEndP); irListen.Start(); } catch(SocketException exSoc) { MessageBox.Show("Couldn't listen on service " + irServiceName + ": " + exSoc.ErrorCode); }
Reference
IrDAListener MembersSystem.Net.Sockets Namespace
Other Resources
How to: Make an Infrared File TransferCommunity Additions
ADD
Show: