MCPcopy Create free account
hub / github.com/EasyIME/PIME / add_sockets

Method add_sockets

python/python3/tornado/tcpserver.py:193–206  ·  view source on GitHub ↗

Makes this server start accepting connections on the given sockets. The ``sockets`` parameter is a list of socket objects such as those returned by `~tornado.netutil.bind_sockets`. `add_sockets` is typically used in combination with that method and `tornado.process.f

(self, sockets: Iterable[socket.socket])

Source from the content-addressed store, hash-verified

191 self.add_sockets(sockets)
192
193 def add_sockets(self, sockets: Iterable[socket.socket]) -> None:
194 """Makes this server start accepting connections on the given sockets.
195
196 The ``sockets`` parameter is a list of socket objects such as
197 those returned by `~tornado.netutil.bind_sockets`.
198 `add_sockets` is typically used in combination with that
199 method and `tornado.process.fork_processes` to provide greater
200 control over the initialization of a multi-process server.
201 """
202 for sock in sockets:
203 self._sockets[sock.fileno()] = sock
204 self._handlers[sock.fileno()] = add_accept_handler(
205 sock, self._handle_connection
206 )
207
208 def add_socket(self, socket: socket.socket) -> None:
209 """Singular version of `add_sockets`. Takes a single socket object."""

Callers 8

listenMethod · 0.95
add_socketMethod · 0.95
bindMethod · 0.95
startMethod · 0.95
setUpMethod · 0.80
__init__Method · 0.80
fMethod · 0.80
setUpMethod · 0.80

Calls 2

add_accept_handlerFunction · 0.90
filenoMethod · 0.45

Tested by 4

setUpMethod · 0.64
__init__Method · 0.64
fMethod · 0.64
setUpMethod · 0.64