pomelo
pomelo copied to clipboard
Can't get client ip
客户端IP从获得到使用:https://github.com/NetEase/pomelo/blob/master/lib/connectors/hybridsocket.js#L20 to https://github.com/NetEase/pomelo/blob/master/lib/components/connector.js#L133 ,如果要在程序中判断,则需要 app.get("sessionService").get(..).socket.remoteAddress 这样访问吗?有没有其他方法可以获得?
恩,目前只有这个途径可以。这个需求我们记录下,后面的版本可以加上便捷的接口获取。:)
现在有接口了吗?
之前没有太多人提可能就忽略了,这个我们在新版本就加上。
已加 pomelo 0.9.10版本 sessionService里的getClientAddressBySessionId