示例#1
0
    def got_have(self, piece, connection=None):
        # if DEBUG:
        #     print >>sys.stderr,"PiecePickerStreaming: got_have:",piece
        self.maxhave = max(self.maxhave, piece)
        PiecePicker.got_have(self, piece, connection)
        if self.transporter:
            self.transporter.got_have(piece)

        if self.is_interesting(piece) and connection:
            self.peer_connections[connection]["interesting"][piece] = 1
    def got_have(self, piece, connection=None):
        # if DEBUG:
        #     print >>sys.stderr,"PiecePickerStreaming: got_have:",piece
        self.maxhave = max(self.maxhave, piece)
        PiecePicker.got_have(self, piece, connection)
        if self.transporter:
            self.transporter.got_have(piece)

        if self.is_interesting(piece) and connection:
            self.peer_connections[connection]["interesting"][piece] = 1
示例#3
0
    def got_have(self, piece, connection=None):
        # if DEBUG:
        #     print >>sys.stderr,"PiecePickerStreaming: got_have:",piece
        self.maxhave = max(self.maxhave,piece)

        # Arno, 2010-04-15: STBSPEED Disabled, does nothing but stats.
        #if self.transporter:
        #    self.transporter.got_have( piece )
        PiecePicker.got_have(self,piece,connection)

        if self.is_interesting(piece):
            self.peer_connections[connection]["interesting"][piece] = 1