close connection(s) to host is the host:port spec, as in 'www.cnn.com:8080' as passed in. no error occurs if there is no connection to that host.
(self, host)
| 194 | return [(host, len(li)) for (host, li) in self._cm.get_all().items()] |
| 195 | |
| 196 | def close_connection(self, host): |
| 197 | """close connection(s) to <host> |
| 198 | host is the host:port spec, as in 'www.cnn.com:8080' as passed in. |
| 199 | no error occurs if there is no connection to that host.""" |
| 200 | for h in self._cm.get_all(host): |
| 201 | self._cm.remove(h) |
| 202 | h.close() |
| 203 | |
| 204 | def close_all(self): |
| 205 | """close all open connections""" |