There are use cases where this API is used by a service multiple times within a given minute. Wouldn't it be beneficial to have a predefined socket created and use the same socket for all send and/receive instead of creating a new socket on every invocation of the API i.e. avoid calling _create_socket on every invocation thus saving on socket lifecycle?
There are use cases where this API is used by a service multiple times within a given minute. Wouldn't it be beneficial to have a predefined socket created and use the same socket for all send and/receive instead of creating a new socket on every invocation of the API i.e. avoid calling _create_socket on every invocation thus saving on socket lifecycle?