Sha256: 3278534b0ce7f23c9ee44a53a943f2773f3833711f763e659f696b13b938de69
Contents?: true
Size: 375 Bytes
Versions: 1
Compression:
Stored size: 375 Bytes
Contents
require 'socket' module Udp2sqsClient class Client def initialize @host, @port = "localhost", 9732 end def configure(host: "localhost", port: 9732) @host, @port = host, port end def send(message) s = UDPSocket.new bytes_sent = s.send(message, 0, @host, @port) return bytes_sent == message.bytesize end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
udp2sqs_client-0.1.0 | lib/udp2sqs_client/client.rb |