Browse files

Merge pull request #23 from stephank/remoteAddress

Property for the remote address of a socket.
  • Loading branch information...
2 parents 00af6db + ab5cfde commit 296a921a295e031827549ed89f4a755eab24429d @majek majek committed Oct 21, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/transport.coffee
View
5 src/transport.coffee
@@ -78,6 +78,11 @@ class Session
@recv = recv
@recv.session = @
+ # Store the last known address.
+ unless socket = @recv.connection
+ socket = @recv.response.connection
+ @connection.remoteAddress = socket.remoteAddress
+
# first, send the open frame
if @readyState is Transport.CONNECTING
@recv.doSendFrame('o')

0 comments on commit 296a921

Please sign in to comment.