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): |