def recvfrom(self, socket):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (not (socket.addr and self.sap[socket.addr])):
        raise Error(errno.EBADF)
    if isinstance(socket, RawAccessPoint):
        return (socket.recv(), None)
    if isinstance(socket, LogicalDataLink):
        return socket.recvfrom()
    if isinstance(socket, DataLinkConnection):
        return (socket.recv(), socket.peer)
def recvfrom(self, socket):
    if (not isinstance(socket, TransmissionControlObject)):
        raise Error(errno.ENOTSOCK)
    if (not (socket.addr and self.sap[socket.addr])):
        raise Error(errno.EBADF)
    if isinstance(socket, RawAccessPoint):
        return (socket.recv(), None)
    if isinstance(socket, LogicalDataLink):
        return socket.recvfrom()
    if isinstance(socket, DataLinkConnection):
        return (socket.recv(), socket.peer)