code: def writeFrame(self, data):
      
  
      cachename = CACHE_FILE_NAME + str(self.sessionId) + CACHE_FILE_EXT
  
      try:
        file = open(cachename, "wb")
      except:
        print "file open error"
  
      try:
        file.write(data)
      except:
        print "file write error"
  
      file.close()
  
      return cachename
docs: Write the received frame to a temp image file. Return the image file.