Click or drag to resize

wclCustomObexClientConnect Method

Connects to an OBEX server.

Namespace: wclCommunication
Assembly: wclCommunication (in wclCommunication.dll) Version: 8.0.6.0
Syntax
protected int Connect(
	Guid Target,
	Guid Who,
	string Description,
	ushort PacketSize
)

Parameters

Target  Guid
Specifies the UUID of a desired application. If the Target is not used the parameter must be set to NULL_GUID.
Who  Guid
Can also be used when it is necessary to identify a client initiating the exchange. If the Who is not used the parameter must be set to NULL_GUID.
Description  String
Provides an information about a device or service. If the Description is not used the parameter must be set to an empty string.
PacketSize  UInt16
The maximum OBEX packet size. The minimum allowed value is 255.

Return Value

Int32
If the methodc ompleted with success the return value is WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.
Remarks

The Target and Who are used to hold a unique identifier, which allows applications to tell whether they are talking to a strict peer, or not. Typically, this is used to enable additional capabilities supplied only by an exact peer.

On full-featured [PC] platforms, multiple OBEX applications may exist concurrently. This leads to the need for the client to be able to uniquely identify which server it wants to handle its request. The server is therefore identified with the OBEX Target header. If necessary, the client can also identify itself, using the OBEX Who header. The following text describes the exact uses of these headers.

To target a specific application with OBEX commands the client must set-up a connection to the application by using the OBEX Target header in a CONNECT request. This type of connection is called a directed connection and provides a virtual binding between the client and server. The Target header should specify the UUID of the desired application. The Who header can also be used when it is necessary to identify the client initiating the exchange. The Who header should be used in cases where the target server application supports different client applications and may care which one it is connecting to. It is unnecessary to send a Who header in the request if its only logical value is the same as the Target header.

See Also