ZeroMQ

master

A ZeroMQ library created by our folks from Zewo. The original ->
EVOlution-App/ZeroMQ

ZeroMQKit

Swift Platform License

ZeroMQKit is a 0mq binding for Swift 4 and this repository is a fork of ZeroMQ.

Features

  • Context
  • Socket
  • Message
  • Poller
  • Proxy

Example

import ZeroMQKit

guard let context = try? Context() else {
    fatalError("Context could not be instantiated")
}

guard let inbound = try? context.socket(.pull) else {
    fatalError("Cannot create socket to .pull")
}
try? inbound.bind("tcp://127.0.0.1:5555")

if let outbound = try? context.socket(.push) {
    try outbound.connect("tcp://127.0.0.1:5555")
    
    _ = try outbound.send("Hello World!")
    _ = try outbound.send("Bye!")
}

while let data = try? inbound.receive(), let value = data, value != "Bye!" {
    print(value) // "Hello World!"
}

Installation

Install ZeroMQ system library

./setup_env.sh

Add ZeroMQ to Package.swift

import PackageDescription

let package = Package(
    dependencies: [
        .package(url: "https://github.com/unnamedd/ZeroMQ.git", .upToNextMajor(from: "1.0.0")),
    ]
)

Support

If you need any help you can join on Slack of Zewo and go to the #help channel. Or you can create a Github issue in our main repository. When stating your issue be sure to add enough details, specify what module is causing the problem and reproduction steps.

License

This project is released under the MIT license. See LICENSE for details.

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 19 2024 10:12:58 GMT-0900 (Hawaii-Aleutian Daylight Time)