Changeset 392

Show
Ignore:
Timestamp:
01/10/03 15:44:24 (6 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBTelepathy/RBTelepathy/Stream/Protocol.py

    r390 r392  
    5050    delimiter = '\x1F' # ASCII unit seperator 
    5151    data = None 
    52     datahandler = None 
     52    packet = None 
    5353 
    5454    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    6464        else: self.data = streamdata 
    6565 
    66         if self.datahandler is None: 
     66        if self.currnetpacket is None: 
    6767            try:  
    6868                # Try to seperate the information packet from the data packet 
     
    7373                # We now have our information packet... we can figure out what we 
    7474                # are supposed to do with the content stream now 
    75                 self.datahandler = Packet.Packet.Build(self, info) 
    76                 self.data = self.datahandler(self, self.data
     75                self.currnetpacket = Packet.Packet.Build(self, info) 
     76                self.currnetpacket.OnStreamData(self.data, self.OnPacketComplete
    7777        else: 
    78             self.data = self.datahandler(self, self.data
     78            self.currnetpacket.OnStreamData(self.data, self.OnPacketComplete
    7979 
    8080    def OnPacketComplete(self, packet): 
    8181        self.connection.OnStreamPacket(packet) 
    82         del self.datahandler 
     82        del self.currnetpacket 
    8383 
    8484#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~