zeromq-crystal v0.3.0
forked from crystal-community/zeromq-crystalzeromq
Bindings for ZeroMQ (http://zero.mq) Ported from (https://github.com/chuckremes/ffi-rzmq-core) Thank you @chuckremes
Installation
Add this to your application's shard.yml
:
dependencies:
zeromq:
github: crystal-community/zeromq-crystal
Usage
require "zeromq"
# Simple server
context = ZMQ::Context.new
server = context.socket(ZMQ::REP)
server.bind("tcp://127.0.0.1:5555")
loop do
puts server.receive_string
server.send_string("Got it")
end
# Simple client
context = ZMQ::Context.new
client = context.socket(ZMQ::REQ)
client.connect("tcp://127.0.0.1:5555")
client.send_string("Fetch")
puts client.receive_string
TODO
- Add more tests
- Add more examples
Contributing
- Fork it ( https://github.com/benoist/zeromq-crystal/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- Benoist Benoist Claassen - creator, maintainer
- Hristo Kochev Hristo Kochev
Repository
zeromq-crystal
Owner
Statistic
- 0
- 1
- 0
- 0
- 0
- almost 5 years ago
- May 7, 2019
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 10:08:06 GMT
Languages