Skip to content

Commit

Permalink
Get peer information
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Aug 9, 2010
1 parent b37686f commit 6b60ffe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/simple_protocol_server.rb
Expand Up @@ -15,6 +15,8 @@ def post_init
@buffer = ''
@multiline = false
@output_q = []
peer = get_peername[2,6].unpack('nC4')
@peer = {:port => peer.shift, :ip => peer.join('.')}
end

def receive_data(data)
Expand Down

0 comments on commit 6b60ffe

Please sign in to comment.