Swiftpack.co - neutronstarer/npc_swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by neutronstarer.
neutronstarer/npc_swift 4.7.5
Near Procedure Call.
⭐️ 0
🕓 51 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/neutronstarer/npc_swift.git", from: "4.7.5")


Near Procedure Call.


Create instance

let npc = NPC({message in 
    // send message to near npc

register handle

npc.on("ping") { param, notify, reply in
    // reply content
    reply("pong", nil)
    // return a cancel function which could be nil.
    return nil


n0.deliver("ping", param: nil, timeout: 0, onNotify: {param in
    // param is notification
}, onReply:{param, error in
    //param is repication
    //error is error-replication

More usage is in example app.


Stars: 0
Last commit: 51 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics