Forms a connection to the specified service on an arbitrary peer.
- 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.
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).
| Exception | Condition |
|---|---|
| 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
(or ErrorCode on NETCF)
for what error occurred.
|