code: def ApplicationReceiving(self, app, streams):
          
  
          # we should only proceed if we are in TCP mode
          if stype != socket.SOCK_STREAM:
              return
  
          # handle all streams
          for stream in streams:
              # read object from the stream
              obj = StreamRead(stream)
              if obj:
                  if obj[0] == cmdData:
                      # data were received, reroute it to the tunnel based on the tunnel ID
                      try:
                          TCPTunnel.threads[obj[1]].send(obj[2])
                      except KeyError:
                          pass
                  elif obj[0] == cmdConnect:
                      # a connection request received, connect the socket
                      n = obj[1]
                      sock = socket.socket(type=stype)
                      try:
                          sock.connect(addr)
                          # start the tunnel thread
                          TCPTunnel(sock, stream, n).start()
                      except socket.error, e:
                          # connection failed, send an error report back through the stream
                          print 'error (%s): %s' % (n, e)
                          StreamWrite(stream, cmdError, n, tuple(e))
                          StreamWrite(stream, cmdDisconnect, n)
                  elif obj[0] == cmdDisconnect:
                      # an disconnection request received, close the tunnel
                      try:
                          TCPTunnel.threads[obj[1]].close()
                      except KeyError:
                          pass
                  elif obj[0] == cmdError:
                      # connection failed on the other side, display the error
                      print 'error (%s): %s' % obj[1:2]
docs: Called when the list of streams with data ready to be read changes.