sitegui / nodejs-websocket

A node.js module for websocket server and client
MIT License
736 stars 155 forks source link

Client IP address? #21

Closed scripting closed 8 years ago

scripting commented 8 years ago

Is there a way to get the IP address of the client from the connection object?

Thanks in advance. I'm using this package as the server component for updates for scripting.com. It's working really well. Thank you.

sitegui commented 8 years ago

Hello @scripting

Yes: conn.socket.remoteAddress. See the docs on Connection#socket and Socket#remoteAddress

You're welcome ;)

(I'll close this, if this doesn't work for you, feel free to reopen)

scripting commented 8 years ago

Thanks, this worked. ;-)