예제 #1
0
파일: tab.py 프로젝트: UCSD-PL/cbrowser
    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)
예제 #2
0
파일: tab.py 프로젝트: UCSD-PL/cbrowser
    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)
예제 #3
0
파일: cookie.py 프로젝트: raoariel/quark
 def write_message(self, m):
     msg.write_message_soc(m, self.soc)
예제 #4
0
 def write_message(self, m):
     klog(">> " + str(m))
     msg.write_message_soc(m, self.soc)
예제 #5
0
 def write_message(self, m):
     klog(">> " + str(m))
     msg.write_message_soc(m, self.soc)
예제 #6
0
 def write_message(self, m):
     msg.write_message_soc(m, self.soc)
예제 #7
0
파일: tab.py 프로젝트: raoariel/quark
 def write_message(self, m):
     #tlog("BEGIN]write_message is called")
     #tlog(">> " + str(m))
     #stime = time.time()
     msg.write_message_soc(m, self.soc)