Name
GetConnectionInfo -- get connection information (V8.0)
Synopsis
int error = GetConnectionInfo(APTR handle, struct hwTagList *tags);
Function
Hollywood will call this function to get more information about the connection specified by handle. It will pass a tag list to GetConnectionInfo() that will contain one or more of the following tags, describing the information Hollywood would like to obtain:

HWCONNINFOTAG_LOCALIP:
Hollywood wants to obtain the local IP for this connection. If this tag is set, you need to copy the IP address as a string to the pData member of this tag. The maximum length is 256 bytes bytes.

HWCONNINFOTAG_LOCALPORT:
Hollywood wants to obtain the local port for this connection. If this tag is set, you need to write the local port of this connection to the pData member which will contain a pointer to an int.

HWCONNINFOTAG_REMOTEIP:
Hollywood wants to obtain the remote IP for this connection. If this tag is set, you need to copy the IP address as a string to the pData member of this tag. The maximum length is 256 bytes bytes.

HWCONNINFOTAG_REMOTEPORT:
Hollywood wants to obtain the remote port for this connection. If this tag is set, you need to write the local port of this connection to the pData member which will contain a pointer to an int.

HWCONNINFOTAG_DOWNLOADSIZE:
Hollywood wants to know the total size of the data to be downloaded. Hollywood will only ever query this if your plugin has taken over protocol handling for the connection, i.e. if it has set HWOPENCONNTAG_CUSTOMPROTOCOL to True in OpenConnection(). In that case, the pData member of this tag will be a pointer to a DOSINT64 and you have to write the total number of bytes to be downloaded to this pointer. (V9.0)

HWCONNINFOTAG_DOWNLOADCOUNT:
Hollywood wants to know the number of bytes that have already been downloaded. Hollywood will only ever query this if your plugin has taken over protocol handling for the connection, i.e. if it has set HWOPENCONNTAG_CUSTOMPROTOCOL to True in OpenConnection(). In that case, the pData member of this tag will be a pointer to a DOSINT64 and you have to write the total number of bytes already downloaded to this pointer. (V9.0)

HWCONNINFOTAG_UPLOADSIZE:
Hollywood wants to know the total size of the data to be uploaded. Hollywood will only ever query this if your plugin has taken over protocol handling for the connection, i.e. if it has set HWOPENCONNTAG_CUSTOMPROTOCOL to True in OpenConnection(). In that case, the pData member of this tag will be a pointer to a DOSINT64 and you have to write the total number of bytes to be uploaded to this pointer. (V9.0)

HWCONNINFOTAG_UPLOADCOUNT:
Hollywood wants to know the number of bytes that have already been uploaded. Hollywood will only ever query this if your plugin has taken over protocol handling for the connection, i.e. if it has set HWOPENCONNTAG_CUSTOMPROTOCOL to True in OpenConnection(). In that case, the pData member of this tag will be a pointer to a DOSINT64 and you have to write the total number of bytes already uploaded to this pointer. (V9.0)

Inputs
handle
connection handle returned by OpenConnection()
tags
a tag list describing the information Hollywood wants to obtain
Results
error
error code or 0 for success

Show TOC