Sets the value of some option for the current handle. Alternately, can query the value of some option for the current handle.
Synopsis
error = InetOption(option, data, operation)
Args
operation is one of the following:
Value | Meaning |
---|---|
SET | Set the value of the option. In this case, data is the desired value for the option. |
GET | Get the value of the option. In this case, data is the name of some variable that you wish set to the current value of the option. |
If omitted, operation defaults to "SET".
option is the name of the option to query or set. It may be one of the following:
Value | Meaning |
---|---|
ONLINE | The connection state. If setting, then data is a 1 to force offline, or 0 otherwise. If getting, then data.1 is set to either "ON" (online), "OFF" (offline), or "CANCEL" (user cancelled connection), data.2 is set to either "IDLE" (no current internet activity) or "BUSY". |
PASSWORD | The password used for all subsequent RexxInet function calls after InetConnect. This option must be set after you call InetConnect. data is the password. |
USER | The user name for all calls you make to RexxInet functions after InetConnect. This option must be set after calling InetConnect. data is the user name. |
PROXY | The proxy information. data.0 is "DIRECT", "PROXY", or "PRECONFIG". data.1 are the proxy server names. data.2 are the server names to bypass. If this option is set before calling InetOpen, then it applies to all calls you make to InetOpen where you do not pass specific proxy args to InetOpen. Otherwise, set the option after calling InetOpen if you need to change proxy information per each InetOpen call. |
PROXYPWD | The password currently being used to access the proxy. data is the password. |
PROXYUSER | The user name currently being used to access the proxy. data is the user name. |
REFRESH | Determines if the proxy information can be reread from the registry for the current handle. data is 1 if so, or 0 otherwise. |
RETRIES | The number of times to retry a connection request. If a connection attempt still fails after the specified number of tries, the request is canceled. data is the number of retries allowed. |
ONLINE | |
CONNECT | The time-out value, in milliseconds, to use for Internet connection requests. If a connection takes longer than this time-out value, then the connection is cancelled. data is the number of milliseconds. |
RECEIVE | The time-out value, in milliseconds, for data download to start. If the download takes longer to start than this time-out, the download is cancelled. data is the number of milliseconds. |
SEND | The time-out value, in milliseconds, for data upload to start. If the upload takes longer to start than this time-out, the upload is cancelled. data is the number of milliseconds. |
RCVTIME | The time-out value, in milliseconds, for a response to some header. If a response doesn't happen within this time-out, the operation is cancelled. data is the number of milliseconds. |
SENDTIME | The time-out value, in milliseconds, to send some header. If the header can't be sent within this time-out, the operation is canceled. data is the number of milliseconds. |
PRIORITY | The priority of requests competing for a connection to a particular HTTP server. |
CACHEKEY | The secondary cache key. |
AGENT | The agent string used in sent HTTP headers (which you don't override by passing specific agent args to InetAddHeader or InetSendHeader). |
HTTPVERS | The version/revision numbers sent in HTTP headers. data is the name of a stem variable, and data.0 is set to the version, and data.1 is set to the revision. |
READSIZE | The size of the underlying buffer used for InetMatchName, or an InetStartFile download. data is the size in bytes. Normally, you will not need to change this size unless you get low level errors about overruns. You may still need to call InetMaxIn to set the size limit on a downloaded resource. |
WRITESIZE | The size of the underlying buffer used for InetPutFile, or an InetStartFile upload. data is the size in bytes. |
If doing a GET operation, you can alternately specify one of the following options. These are not valid for a SET operation:
Value | Meaning |
---|---|
DATAFILE | Get the name of the file backing a downloaded entity. data will be set to that name. |
ERROR | Returns the Windows Sockets error message for the last RexxInet error. |
TYPE | Returns the handle type of the current handle. |
PARENT | Get the parent handle of the current handle. |
FLAGS | Returns special status BITs about the current download in progress. |
CERTIFICATE | Returns the certificate for an SSL/PCT (Secure Sockets Layer/Private Communications Technology) server. data is a string formatted with all the information. |
URL | Get the full address of the currently accessed resource. If the original URL contained any extra information (such as search strings or anchors) or if the call was redirected, the URL returned will differ from the original URL you passed to InetConnectURL, InetStartFile, or InetSendHeader. This option should be queried only after a call to one of the preceding functions. |
VERSION | Get the version/revision numbers of the Windows internet support. data is the name of a stem variable, and data.0 is set to the version, and data.1 is set to the revision. |
If doing a SET operation, you can alternately specify one of the following options. These are not valid for a GET operation:
Value | Meaning |
---|---|
FLUSH | Flushes entries not in use from the password cache on the hard drive. |
CLIENTCERT | Sets the client certification. |
Returns
An empty string if successful, or an error message if a failure.
Notes