Changeset 1581

Show
Ignore:
Timestamp:
10/29/08 20:09:54 (2 months ago)
Author:
peet
Message:

getCache(): get records directly from cache

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.4.7/lib/cxcore/cxcore/cxnetlink.py

    r1578 r1581  
    202202                 
    203203                return result 
     204 
     205        def getCache(self,host,types=[zeroconf._TYPE_A, zeroconf._TYPE_SRV, zeroconf._TYPE_TXT]): 
     206                e =  self.server.cache.entriesWithName(host) 
     207                r = [] 
     208                for i in e: 
     209                        if i.type in types: 
     210                                r.append(i) 
     211                return r 
    204212 
    205213        def lookup(self,host,domain=None,types=[zeroconf._TYPE_A, zeroconf._TYPE_SRV],nowait=False):