MrJoes/tornadio — Issue #35: Create method for getting remote ip (or should be made SocketConnection.protocol public?)
Author: fzzbt
Created: 2011-10-15 03:02:38+00:00
State: open

I needed to get the remote ip address of the connected user in my app, so I did this:
```python
class MyConnection(tornadio.SocketConnection):
def on_open(self, *args, **kwargs):
user_ip = self._protocol.request.remote_ip
```
As you can see this is pretty ugly as protocol is set to private.
Would it make more sense to just set protocol to public or give a method for getting ip address (eg. SocketConnection.remote_ip())?