File: xml.py

package info (click to toggle)
mongrel2 1.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,976 kB
  • sloc: ansic: 39,083; python: 2,833; sql: 1,555; sh: 467; makefile: 360; asm: 189; yacc: 145; php: 73; awk: 28; sed: 5
file content (25 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from mongrel2 import handler
try:
    import json
except:
    import simplejson as json

sender_id = "82209006-86FF-4982-B5EA-D1E29E55D481"

conn = handler.Connection(sender_id, "tcp://127.0.0.1:9995",
                          "tcp://127.0.0.1:9994")

COUNT = 0

while True:
    print "WAITING FOR REQUEST", COUNT

    req = conn.recv()

    if req.is_disconnect():
        print "DISCONNECT"
        continue
    else:
        print "GOT ONE"
        COUNT += 1