Method: Ftpd::ConnectionTracker#connections_for

Defined in:
lib/ftpd/connection_tracker.rb

#connections_for(socket) ⇒ Object

Return the number of connections for a socket’s peer IP



29
30
31
32
33
34
# File 'lib/ftpd/connection_tracker.rb', line 29

def connections_for(socket)
  @mutex.synchronize do
    ip = peer_ip(socket)
    @connections[ip] || 0
  end
end