http://stackoverflow.com/questions/3110919/how-do-i-get-the-client-ip-of-a-tornado-request
Above link tells us how we could derive the Client IP for a Request Handler. What about while using a Websocket Handler?
Thanks.
The class WebSocketHandler
extends RequestHandler
class WebSocketHandler(tornado.web.RequestHandler):
So, you can get the ip in this way:
class SocketHandler(tornado.websocket.WebSocketHandler):
def open(self):
logging.info('Client IP:' + self.request.remote_ip)