How could I set "socket_options" when using lambda client #3603
-
Hi, I am trying to set # botocore > args > ClientArgsCreator > _compute_socket_options
def _compute_socket_options(self, scoped_config, client_config=None):
# This disables Nagle's algorithm and is the default socket options
# in urllib3.
socket_options = [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)]
client_keepalive = client_config and client_config.tcp_keepalive
scoped_keepalive = scoped_config and self._ensure_boolean(
scoped_config.get("tcp_keepalive", False)
)
# Enables TCP Keepalive if specified in client config object or shared config file.
if client_keepalive or scoped_keepalive:
socket_options.append((socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1))
return socket_options So I have to rewrite this method to add socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60))
socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 20))
socket_options.append((socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 80)) Is there any other way without rewriting? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @chyok thanks for reaching out. Can you elaborate on your use case and what you're trying to accomplish? I don't think there is a way to support those TCP options you mentioned without rewriting that code. |
Beta Was this translation helpful? Give feedback.
Hi @chyok thanks for reaching out. Can you elaborate on your use case and what you're trying to accomplish? I don't think there is a way to support those TCP options you mentioned without rewriting that code.