Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

src/a/n/Anomos-HEAD/Anomos/TwistedNatCheck.py   Anomos(Download)
import M2Crypto.SSL as SSL
 
from Anomos.Protocol import NAT_CHECK_ID, NAME as PROTOCOL_NAME
from Anomos.P2PConnection import PostConnectionChecker
from Anomos import LOG as log
class TwistedNatCheck(protocol.Protocol, basic.StatefulStringProtocol):
    state = "init"
    nid = NAT_CHECK_ID
    protocol_extensions = '\0'*7
    expecting = 1

src/a/n/Anomos-HEAD/Anomos/AnomosNeighborInitializer.py   Anomos(Download)
# Written by John M. Schanck
 
from Anomos.Protocol import NAT_CHECK_ID, NAME as protocol_name
from Anomos import LOG as log
 
        self.complete = True
        self.manager.connection_completed(self.socket, self.id)
        if self.id == NAT_CHECK_ID:
            self.socket.handle_close()
        self.socket = None
    def socket_closed(self):
        if self.id and self.id != NAT_CHECK_ID:
            log.info("Failed to initialize connection to \\x%02x" % ord(self.id))
        if not self.complete:
            self.manager.initializer_failed(self.id)

src/a/n/Anomos-HEAD/Anomos/NeighborLink.py   Anomos(Download)
from Anomos.PartialMessageQueue import PartialMessageQueue
from Anomos.Protocol.AnomosNeighborProtocol import AnomosNeighborProtocol
from Anomos.Protocol import NAT_CHECK_ID
from Anomos import LOG as log
 

src/a/n/Anomos-HEAD/Anomos/NeighborManager.py   Anomos(Download)
from Anomos.P2PConnection import P2PConnection
from Anomos.TCReader import TCReader
from Anomos.Protocol import NAT_CHECK_ID
from Anomos.Measure import Measure
from Anomos import BTFailure, LOG as log
    def connection_completed(self, socket, id):
        """Called by AnomosNeighborInitializer"""
        if self.incomplete.has_key(id):
            del self.incomplete[id]
        if id == NAT_CHECK_ID: