lib/kamerling/net_dispatcher.rb in kamerling-0.0.1 vs lib/kamerling/net_dispatcher.rb in kamerling-0.0.2

- old
+ new

@@ -1,5 +1,7 @@ -module Kamerling class NetDispatcher +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