Пример #1
0
	def send_error(self, client, http_error):
		print 'Channel> send_error %s - %i' % (client, http_error.code)
		client.start_response(http_error.status, [('Content-Type','text/plain; charset="ISO-8859-1"')])
		evwsgi.write_response(client, [http_error.status])
Пример #2
0
	def send_message(self, client, message):
		print 'Channel> send_message %s - %s' % (client, message)
		client.start_response('200 OK', [('Content-Type','application/json; charset="ISO-8859-1"')])
		evwsgi.write_response(client, [str(message)])