Sha256: 3ee6cc9fdba1041344d1e61138201d361ce1b67713f56ba08d9b4768a96e46ad
Contents?: true
Size: 249 Bytes
Versions: 1
Compression:
Stored size: 249 Bytes
Contents
module Kamerling module NetDispatcher module_function 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.2 | lib/kamerling/net_dispatcher.rb |