Module deltachat::net

source Β·
Expand description

Β§Common network utilities.

Modules§

  • dns πŸ”’
    DNS resolution and cache.
  • http πŸ”’
    HTTP module.
  • proxy πŸ”’
    Proxy support.
  • session πŸ”’
  • tls πŸ”’
    TLS support.

Structs§

Constants§

  • CACHE_TTL πŸ”’
    TTL for caches in seconds.
  • TIMEOUT πŸ”’
    Connection, write and read timeout.

Functions§

  • connect_tcp πŸ”’
    If load_cache is true, may use cached DNS results. Because the cache may be poisoned with incorrect results by networks hijacking DNS requests, this option should only be used when connection is authenticated, for example using TLS. If TLS is not used or invalid TLS certificates are allowed, this option should be disabled.
  • Returns a TCP connection stream with read/write timeouts set and Nagle’s algorithm disabled with TCP_NODELAY.
  • Attempts to establish TLS connection given the result of the hostname to address resolution.
  • Returns timestamp of the most recent successful connection to the host and port for given protocol.
  • Removes connection history entries after CACHE_TTL.
  • Retrieves the text contents of URL using HTTP GET request.
  • Retrieves the binary contents of URL using HTTP GET request.
  • Runs connection attempt futures.