Sha256: 12ba633e50a05c4c01edcf821f70bf81382268e920cddf9314520f56ce188f5a
Contents?: true
Size: 470 Bytes
Versions: 8
Compression:
Stored size: 470 Bytes
Contents
#!/usr/bin/env ruby require 'zmachine/tcp_channel' include ZMachine server = TCPChannel.new server.bind("0.0.0.0", 12345) client = TCPChannel.new client.connect("0.0.0.0", 12345) channel = server.accept client.finish_connecting data = ("x" * 2048).freeze loop do client.send_data(data) client.write_outbound_data received = channel.read_inbound_data puts received channel.send_data(received) channel.write_outbound_data client.read_inbound_data end
Version data entries
8 entries across 8 versions & 1 rubygems