'Retrieve a list of shared resources on remote server.
:return: A list of :doc:`smb.base.SharedDevice<smb_SharedDevice>` instances describing the shared resource'

def listShares(self, timeout=30):

    if (not self.sock):
        raise NotConnectedError('Not    connected    to    server')
    results = []
    def cb(entries):
        self.is_busy = False
        results.extend(entries)
    def eb(failure):
        self.is_busy = False
        raise failure
    self.is_busy = True
    try:
        self._listShares(cb, eb, timeout)
        while self.is_busy:
            self._pollForNetBIOSPacket(timeout)
    finally:
        self.is_busy = False
    return results
