Select Method

Request the specified document or directory listing from the Gopher server.

Syntax

object.Select( [ItemType], [Selector] )

Remarks

The Select method requests the specified item from the Gopher server. If the item type indicates a directory of resources, then the OnItemList event is generated for each directory entry returned by the server.

ItemType
An integer value which identifies the type of resource being requested. If this argument is omitted, the value of the ItemType property is used as the default value. The following item types are recognized by the control:
Value Constant Description
0 gopherItemFile A file, typically a standard text file
1 gopherItemDirectory A directory which contains a list of Gopher items
2 gopherItemPhonebook A phonebook server
3 gopherItemError An error
4 gopherItemBinHex A Macintosh file encoded using the BinHex algorithm
5 gopherItemDosFile An MS-DOS binary file
6 gopherItemUuencode A binary file encoded using the uuencode algorithm
7 gopherItemIndex An index search server
8 gopherItemTelnet A Telnet session
9 gopherItemBinary A binary file
10 gopherItemGIF An image stored in the Graphics Interchange Format (GIF)
11 gopherItemImage A bitmap image stored in an alternate format
12 gopherItemTn3270 A TN3270 Telnet session
13 gopherItemCalendar A calendar server
14 gopherItemSound An audio file
15 gopherItemMime A MIME formatted message
16 gopherItemPDF A file stored in the Portable Document Format (PDF)
17 gopherItemHTML An HTML file
18 gopherItemMailbox A mailbox on a mail server
Selector
The selector string which identifies the resource on the remote server. The item selector is considered to be an opaque string, and does not have any meaning beyond identifying the resource on the Gopher server. If this argument is omitted, the value of the ItemSelector property is used as the default value.

If the item type specifies a file (document, image, executable, etc.) then the Read event is generated for each block of data returned by the server. The client is responsible for reading the data returned by the server and processing it as needed, such as storing it in a file on the local system.

Specifying an item type of gopherItemDirectory and an empty string for the selector causes the Gopher server to return the root directory. The directory listing will provide item selector strings for other resources on the server.

Return Value

A value of zero is returned if the action was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

ItemSelector Property, ItemType Property, GetItem Method, StoreItem Method, OnItemList Event


Copyright © 2008 Catalyst Development Corporation. All rights reserved.