def test_loop(self): while True: #Types, hah next_url = random.randrange(len(urls)) next_url = domain + urls[next_url] m = msg.create_req_uri_follow(next_url) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) m = msg.read_message_soc(self.soc) tlog("Received message: %s" % str(m)) #tlog(m.content) time.sleep(5) if (random.randrange(10) == 0): m = msg.create_display_shm(self.shm_obj.shmid, 0) tlog("display_shm(%d, %d)" % (self.shm_obj.shmid, 0)) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) c = Cookie.SimpleCookie() c.load("Set-Cookie: Foo=Bar; Domain="+domain+"; Path=/; HttpOnly") m = msg.create_set_cookie(c) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) time.sleep(5)
def test_loop(self): while True: #Types, hah next_url = random.randrange(len(urls)) next_url = domain + urls[next_url] m = msg.create_req_uri_follow(next_url) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) m = msg.read_message_soc(self.soc) tlog("Received message: %s" % str(m)) #tlog(m.content) time.sleep(5) if (random.randrange(10) == 0): m = msg.create_display_shm(self.shm_obj.shmid, 0) tlog("display_shm(%d, %d)" % (self.shm_obj.shmid, 0)) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) c = Cookie.SimpleCookie() c.load("Set-Cookie: Foo=Bar; Domain=" + domain + "; Path=/; HttpOnly") m = msg.create_set_cookie(c) tlog("Writing message: %s" % str(m)) msg.write_message_soc(m, self.soc) time.sleep(5)
def write_message(self, m): msg.write_message_soc(m, self.soc)
def write_message(self, m): klog(">> " + str(m)) msg.write_message_soc(m, self.soc)
def write_message(self, m): #tlog("BEGIN]write_message is called") #tlog(">> " + str(m)) #stime = time.time() msg.write_message_soc(m, self.soc)