IrDAClientConnect(String) Method

Forms a connection to the specified service on an arbitrary peer.

Definition

Namespace: InTheHand.Net.Sockets
Assembly: InTheHand.Net.IrDA (in InTheHand.Net.IrDA.dll) Version: 4.0.2+5cdf1cfd21064ea31c5de33d160200ca1c4bc218
C#
public void Connect(
	string service
)

Parameters

service  String
The Service Name to connect to eg "OBEX". In the very uncommon case where a connection is to be made to a specific LSAP-SEL (port number), then use the form "LSAP-SELn", where n is an integer.

Remarks

As noted the connection will be made to an arbitrary peer. This is most useful when it is expected that there will be only one device in range — as is often the case. If a connection is to be made to a particular remote peer, then use Connect(IrDAEndPoint).

Exceptions

InvalidOperationException No peer IrDA device was found. The exception has message “No device”.
SocketException A connection could not be formed. See the exception message or SocketErrorCode for what error occurred.

See Also