rest.py

changeset 93
125f3c97071e
parent 92
da291d9426ea
child 94
2c93636202a5
equal deleted inserted replaced
92:da291d9426ea 93:125f3c97071e
176 176
177 asyncore.dispatcher.__init__ (self) 177 asyncore.dispatcher.__init__ (self)
178 self.create_socket (socket.AF_INET, socket.SOCK_STREAM) 178 self.create_socket (socket.AF_INET, socket.SOCK_STREAM)
179 self.bind (('', g_portnumber)) 179 self.bind (('', g_portnumber))
180 self.listen (5) 180 self.listen (5)
181 print 'REST server initialized'
181 182
182 def handle_accept (self): 183 def handle_accept (self):
183 sock, address = self.accept() 184 sock, address = self.accept()
184 185
185 if is_throttled (address): 186 if is_throttled (address):

mercurial