Ejemplo n.º 1
0
 def getPeers(self):
     peerlist = []
     # not very thread save (TODO: think to make in safer)
     for index in range(f2fcore.f2fPeerListGetSize()):
         peerptr = f2fcore.f2fPeerListGetPeer(index)
         if f2fcore.f2fPeerIsActive(peerptr):
             peerlist.append(Peer(peerptr))
     return peerlist
 def getPeers(self):
     peerlist=[]
     # not very thread save (TODO: think to make in safer)
     for index in range(f2fcore.f2fPeerListGetSize()):
         peerptr = f2fcore.f2fPeerListGetPeer(index)
         if f2fcore.f2fPeerIsActive( peerptr ):
             peerlist.append(Peer(peerptr))
     return peerlist
Ejemplo n.º 3
0
def showPeerList():
    print "Peerlist:"
    for index in range(f2fcore.f2fPeerListGetSize()):
        peer = f2fcore.f2fPeerListGetPeer(index)
        print "Peerid:", f2fcore.f2fPeerGetUIDHi(peer),\
            ",", f2fcore.f2fPeerGetUIDLo(peer), "localpeerid:",\
            f2fcore.f2fPeerGetLocalPeerId(peer)
    print
Ejemplo n.º 4
0
def showPeerList():
    print "Peerlist:"
    for index in range(f2fcore.f2fPeerListGetSize()):
        peer = f2fcore.f2fPeerListGetPeer(index)
        print "Peerid:", f2fcore.f2fPeerGetUIDHi(peer),\
            ",", f2fcore.f2fPeerGetUIDLo(peer), "localpeerid:",\
            f2fcore.f2fPeerGetLocalPeerId(peer)
    print