IrDA Framework
ContentsIndexHome
PreviousUpNext
TwclCustomObexClient.Connect Method

Connects to an OBEX server.

Syntax
Pascal
function Connect(const Target: TGUID; const Who: TGUID; const Description: string): Integer;
Parameters 
Description 
const Target: TGUID 
Specifys the UUID of the desired application. If the Target is not used it must be set to NULL GUID.  
const Who: TGUID 
Can also be used when it is necessary to identify the client initiating the exchange. If the Who is not used it must be set to NULL GUID.  
const Description: string 
Provides an information about the device or service. If the Description is not used it must be set to an empty string. 

If the function succeed the return value is WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

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.  

 

Copyright (c) 2006-2019. All rights reserved.