Connection mager, it keeps a pool of opened connections and reap them
after a delay if reap_connection is True. By default a thread is used to
reap connections, but it can be replaced with signaling if needed. In
this case a signal will be send to the manager after a delay. Be aware
that using signaling isn't thread-safe and works only on UNIX or UNIX
like.
|
__init__(self,
max_conn=10,
timeout=150,
reap_connections=True,
with_signaling=False)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
all_connections_count(self)
return all counts per address registered. |
source code
|
|
|
connection_count(self,
addr,
ssl)
get connections count for an address |
source code
|
|
|
find_socket(self,
addr,
ssl=False)
find a socket from a its address in the pool and return if there is
one available, else, return None |
source code
|
|
|
|
|
store_socket(self,
sck,
addr,
ssl=False)
store a socket in the pool to reuse it across threads |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|