# File lib/rubytorrent/server.rb, line 64 def add_connection(name, cont, socket) begin shake_hands(socket, cont.info_hash) peer = PeerConnection.new(name, cont, socket, cont.package) cont.add_peer peer rescue ProtocolError => e socket.close rescue nil end end