Brecham.Obex — An OBEX library for the .NET Framework

ObexClientSession.Connect Method (ObexHeaderCollection)

Carry out a Connect operation, including the given headers in the request PDU.

[Visual Basic]
Overloads Public Function Connect( _
   ByVal headers As ObexHeaderCollection _
) As ObexParsedResponsePdu
[C#]
public ObexParsedResponsePdu Connect(
   ObexHeaderCollection headers
);

Parameters

headers
[Advanced usage] An ObexHeaderCollection containing the headers to be sent in the Connect request.

Return Value

The PDU received in response from the server, as a ObexParsedResponsePdu.

Remarks

For Directed applications, the headers should include a Target header and possibly a Who header. If the directed connect is accepted then the server should return these similar headers in its response, however we do *no* checking of the response headers, that is the caller's responsibility in this case.

In either case if the response contains a ConnectionId header then the value is stored to use in any subsequent requests.

See Also

ObexClientSession Class | Brecham.Obex Namespace | ObexClientSession.Connect Overload List