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

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

src/a/n/Anomos-HEAD/Anomos/Protocol/AnomosEndPointProtocol.py   Anomos(Download)
# Written by John Schanck
 
from Anomos.Protocol import CHOKE, UNCHOKE, INTERESTED, NOT_INTERESTED, \
                            HAVE, BITFIELD, REQUEST, PIECE, CANCEL, \
                            TCODE, CONFIRM, ENCRYPTED, BREAK, PARTIAL, \
                            NOT_INTERESTED: self.got_not_interested,\
                            HAVE: self.got_have,\
                            BITFIELD: self.got_bitfield,\
                            REQUEST: self.got_request,\
                            PIECE: self.got_piece,\
    def send_bitfield(self, bitfield):
        self.transfer_ctl_msg(BITFIELD, bitfield)
    def send_have(self, index):
        self.transfer_ctl_msg(HAVE, tobinary(index))
    def send_tracking_code(self, trackcode):