def connect(self, socket, dest):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (not socket.is_bound):
        self.bind(socket)
    socket.connect(dest)
    log.debug('connected ({0} ===> {1})'.format(socket.addr, socket.peer))
def connect(self, socket, dest):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (not socket.is_bound):
        self.bind(socket)
    socket.connect(dest)
    log.debug('connected ({0} ===> {1})'.format(socket.addr, socket.peer))