Commits

Kaspar Schiess committed 87c580f

REQ/REP sample

Comments (0)

Files changed (2)

web/source/texts/_rep_node.markdown

+
+```ruby
+require 'nanomsg'
+
+rep = NanoMsg::RepSocket.new
+rep.bind('tcp://127.0.0.1:4568')
+
+rep.recv # => 'req 1'
+rep.send 'rep 1'
+```

web/source/texts/_req_node.markdown

+
+```ruby
+require 'nanomsg'
+
+req = NanoMsg::ReqSocket.new
+req.connect('tcp://127.0.0.1:4568')
+
+req.send 'req 1'
+p req.recv # => "rep 1"
+```