Requesting a Data Object from the OBEX Server
The Get method is used to obtain a file from the server.
The following illustration shows the logic associated with a Get command.
The following optional headers are used with the Get request packet:
- Name specifies the name of the object to get. If this value is not specified, the default object is assumed. If there is more than one object on the server, this value is required.
- Type specifies the object type. If this value is not specified, the default object is assumed.
The following header is always used:
- Connection Id identifies the connection identifier returned in the connect response. If a connect command was not issued, a default connection is assumed.
The final bit in a Get request identifies the last header packet describing the object. All subsequent Get requests must set the final bit until the operation completes.
The following headers are included in the Get response packet:
- Name identifies the name of the object being returned, if applicable.
- Length defines length of the object being returned.
- Time includes the header timestamp information.
- Type defines the object type.
- Body includes data.
- EndOfBody marks the end of the body.
In a typical multi-step Get operation, the client sends a Get request that may include a Name header. The server responds with a continue 0x90 code and headers describing the name and size of the pending object. After receiving this code, the client sends another Get request with a final bit set. The server responds with a response packet containing more headers along with another continue response code. The client continues to issue Get requests until the final body of information arrives in an EndOfBody header and the response code is 0xA0, meaning success.
See Also
Last updated on Friday, April 09, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.