'Disconnect from the remote server and unregister self.disconnected method from
the owner\'s dispatcher.'

def plugout(self):

    self._sock.close()
    if self._owner.__dict__.has_key('Connection'):
        del self._owner.Connection
        self._owner.UnregisterDisconnectHandler(self.disconnected)
