sdk.lusid.extensions.tcp_keep_alive_connector.TcpKeepAliveConnector

class TcpKeepAliveConnector(connector, socket_options)[source]

Replacement for aiohttp.TCPConnector which sets socket options on each connection. So we can use tcp keep alives which aiohttp has limited support for.

Attributes

This is a Pydantic class. For now, click on the green [source] link in the class signature above to see descriptions/allowed values for these attributes.

closed

Is connector closed.

family

Socket family like AF_INET.

force_close

Ultimately close connection on releasing if True.

limit

The total number for simultaneous connections.

limit_per_host

The limit for simultaneous connections to the same endpoint.

use_dns_cache

True if local DNS caching is enabled.

Methods

clear_dns_cache

Remove specified host/port or clear all dns local cache.

close

Close all ongoing DNS calls.

connect

Wraps TCP connector, each new connection will have socket options and windows ioctl for keep alives applied

async close()[source]

Close all ongoing DNS calls.

Return type:

None

property closed

Is connector closed.

A readonly property.

async connect(req, traces, timeout)[source]

Wraps TCP connector, each new connection will have socket options and windows ioctl for keep alives applied

Return type:

Connection

Parameters:
  • req (aiohttp.ClientRequest)

  • traces (List[aiohttp.tracing.Trace])

  • timeout (aiohttp.ClientTimeout)