asyncio, Tulip issue 180: Make Server attributes and methods private

- loop, waiters and active_count attributes are now private
- attach(), detach() and wakeup() methods are now private

The sockets attribute remains public.
This commit is contained in:
Victor Stinner 2014-07-11 22:52:21 +02:00
parent 7aee3ecd57
commit b28dbac86d
3 changed files with 25 additions and 24 deletions

View file

@ -35,7 +35,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
self._closing = False # Set when close() called.
self._eof_written = False
if self._server is not None:
self._server.attach(self)
self._server._attach()
self._loop.call_soon(self._protocol.connection_made, self)
if waiter is not None:
# wait until protocol.connection_made() has been called
@ -91,7 +91,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
self._sock.close()
server = self._server
if server is not None:
server.detach(self)
server._detach()
self._server = None
def get_write_buffer_size(self):