Sha256: 425a2db38bef478350cdf90c98f9f2a92e81a99b744fd02208037f61d319f441

Contents?: true

Size: 219 Bytes

Versions: 11

Compression:

Stored size: 219 Bytes

Contents

#!/usr/bin/env ruby

require 'async'
require 'async/io'

endpoint = Async::IO::Endpoint.udp("localhost", 5678)

Async do |task|
	endpoint.connect do |socket|
		socket.send("Hello World")
		pp socket.recv(1024)
	end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
async-io-1.27.2 examples/udp/client.rb
async-io-1.27.1 examples/udp/client.rb
async-io-1.27.0 examples/udp/client.rb
async-io-1.26.0 examples/udp/client.rb
async-io-1.25.0 examples/udp/client.rb
async-io-1.24.0 examples/udp/client.rb
async-io-1.23.3 examples/udp/client.rb
async-io-1.23.1 examples/udp/client.rb
async-io-1.23.0 examples/udp/client.rb
async-io-1.22.0 examples/udp/client.rb
async-io-1.21.0 examples/udp/client.rb