code: def _connected(self, sock):
          
          logger.debug('socket connected, building protocol')
          self.protocol = self.factory.build(self.loop)
          self.connection = Connection(self.loop, self.sock, self.addr,
              self.protocol, self) 
          self.connector = None
          self.connect_deferred.callback(self.protocol)
docs: When the socket is writtable, the socket is ready to be used.