Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 826 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 826 Bytes

Swift binding for nanomsg

CircleCI

Usage

If Swift Package Manager is used, add this package as a dependency in Package.swift,

.Package(url: "https://github.com/autozimu/Nanomsg.swift.git", majorVersion: 0)

Example

Push

import Nanomsg

let sock = try Socket(.PUSH)
try sock.connect("ipc:///tmp/pipeline.ipc")
try sock.send("Yo!")

Pull

import Nanomsg

let sock = try Socket(.PULL)
try sock.bind("ipc:///tmp/pipeline.ipc")
let msg: String = try sock.recv()
print(msg) // Yo!

More examples could be found in examples dir.

Documentation

https://autozimu.github.io/Nanomsg.swift/