Sha256: 4d9efbb3ca94cc8441a5ed05661dbc4fac16b7a627ab432786c6242147628197
Contents?: true
Size: 598 Bytes
Versions: 4
Compression:
Stored size: 598 Bytes
Contents
# encoding: utf-8 # reply.rb # This example is used in conjunction with request.rb. Run this program in # a terminal/console window and then run request.rb in another terminal/console # window and observe the output. # # Usage: ruby reply.rb # # To stop the program terminate the process with Ctrl-C or another # method of your choice. # require File.join(File.dirname(__FILE__), '..', 'lib', 'ffi-rxs') ctx = XS::Context.create() socket = ctx.socket(XS::REP) socket.bind("tcp://127.0.0.1:5000") while true do socket.recv_string(msg = '') puts "Got: " + msg socket.send_string(msg) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ffi-rxs-1.2.1 | examples/reply.rb |
ffi-rxs-1.2.0 | examples/reply.rb |
ffi-rxs-1.1.0 | examples/reply.rb |
ffi-rxs-1.0.1 | examples/reply.rb |