Sha256: 34e8bc512621f52d789c853e29135332ef3f039e983e7f27787bde348a759d07

Contents?: true

Size: 229 Bytes

Versions: 1

Compression:

Stored size: 229 Bytes

Contents

module Kamerling class NetDispatcher
  def dispatch addr, bytes
    case addr.prot
    when :TCP then TCPSocket.open(*addr) { |socket| socket << bytes }
    when :UDP then UDPSocket.new.send bytes, 0, *addr
    end
  end
end end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kamerling-0.0.1 lib/kamerling/net_dispatcher.rb