Swiftpack.co - dannys42/SwiftPacketProcessor as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by dannys42.
dannys42/SwiftPacketProcessor 0.0.2
A type-safe packet processor framework in Swift
⭐️ 8
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/dannys42/SwiftPacketProcessor.git", from: "0.0.2")

Apache 2


The Swift PacketProcessor provides a simple, type-safe way of handling structured packets given a data stream.

PacketProcessor handles the details of buffer management when reading a data stream. Callers need only push newly received data to the PacketProcessor. The correct handlers for the appropriately typed packet will be called when appropriate.

Packet definitions must include rules for validating the packet and returning the number of data elements consumed by the packet. See DataPacket and StringPacket.

Streams can have a base collection type of String or Data by initializing as PacketProcessor<String> or PacketProcessor<Data>.


Swift Package Manager

Add the PacketProcessor package to the dependencies within your application's Package.swift file. Substitute "x.y.z" with the latest PacketProcessor release.

.package(url: "https://github.com/dannys42/SwiftPacketProcessor", from: "x.y.z")

Add PacketProcessor to your target's dependencies:

.target(name: "example", dependencies: ["PacketProcessor"]),


Stars: 8
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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