Sha256: f4ad2cebe75a0da89d1f6ffcb4b6ba2b476a18e86ed0d301e1fe97160d344773
Contents?: true
Size: 352 Bytes
Versions: 1
Compression:
Stored size: 352 Bytes
Contents
module Net class TCPClient module Policy # Policy for connecting to servers in the order specified class Random < Base # Calls the block once for each server, with the addresses in random order def each(&block) addresses.shuffle.each { |address| block.call(address) } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
net_tcp_client-2.2.1 | lib/net/tcp_client/policy/random.rb |