Project

General

Profile

Up

_networkGetValue

Retrieve an info from the given network object. If the transfer is oriented data, you should call this function after _networkPerform or after the end of the transfer.
The type of the return value depends on the given flag.

Prototype :

fun [ObjNetwork I u0] u0

  • ObjNetwork : a network object created with _networkCreate.

  • I : a flag :
    • NETWORK_VALUE_URL : return a string (S) : the last used effective URL
    • NETWORK_VALUE_RESPONSE_CODE : return an integer (I) : the last received HTTP, FTP or SMTP response code. Can return 0 if no response received from the server
    • NETWORK_VALUE_TOTAL_TIME : return an integer (I) : the total time in seconds for the previous transfer, including name resolving, TCP connect etc
    • NETWORK_VALUE_REDIRECT_COUNT : return an ineger (I) : the total number of redirections that were actually followed
    • NETWORK_VALUE_UPLOAD_SIZE : return an ineger (I) : the total amount of bytes that were uploaded
    • NETWORK_VALUE_DOWNLOAD_SIZE : return an ineger (I) : the total amount of bytes that were downloaded. The amount is only for the latest transfer and will be reset again for each new transfer
    • NETWORK_VALUE_UPLOAD_SPEED : return an ineger (I) : the average upload speed that curl measured for the complete upload (in bytes/second)
    • NETWORK_VALUE_DOWNLOAD_SPEED : return an ineger (I) : the average download speed that curl measured for the complete download (in bytes/second)
    • NETWORK_VALUE_UPLOAD_LENGTH : return an ineger (I) : the specified size of the upload
    • NETWORK_VALUE_DOWNLOAD_LENGTH : return an ineger (I) : he content-length of the download (value read from the Content-Length: field)
    • NETWORK_VALUE_CONTENT_TYPE : return a string (S) : the content-type of the downloaded object. This is the value read from the Content-Type: field. If you get nil, it means that the server didn't send a valid Content-Type header or that the protocol used doesn't support this
    • NETWORK_VALUE_HTTPAUTH_AVAILABLE : return an ineger (I) : a bitmask indicating the authentication method(s) available. See networkSetOption
    • NETWORK_VALUE_PROXYAUTH_AVAILABLE : return an ineger (I) : a bitmask indicating the authentication method(s) available for your proxy authentication
    • NETWORK_VALUE_IP_DISTANT : return a string (S) : the destination IP address of the most recent connection done (IPv4 or IPv6)
    • NETWORK_VALUE_IP_LOCAL : return a string (S) : the source IP address of the most recent connection done (IPv4 or IPv6)
    • NETWORK_VALUE_PORT_DISTANT : return an ineger (I) : the destination port of the most recent connection done
    • NETWORK_VALUE_PORT_LOCAL : return an ineger (I) : the source port of the most recent connection done
    • NETWORK_VALUE_COOKIES : return a list of strings ([S r1]) : all cookies knows. Can return nil if cookies is not set (see networkSetOption) or if none have bben received
    • NETWORK_VALUE_FTP_ENTRY : return a string (S) : the path of the entry path (the initial path when logging on to the remote FTP server). Return nil if error
    • NETWORK_VALUE_CERTIFICATE_INFO : return a tuple ([I [S r1]]) : first, the total of availables certificates informations and, second, the list of informations for each certificate provided in the format "name:content". See networkSetOption before use this flag
    • another flag : return nil
  • .
  • u0 : must be nil.

Return : u0 a value depending on the given flag or nil if error.

See also :

networkSetOption

Example :

Note :