A type-safe packet processor framework in Swift

Last update: Jul 10, 2022

Apache 2

PacketProcessor

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>.

Installation

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"]),

GitHub

https://github.com/dannys42/SwiftPacketProcessor
You might also like...

Swift Paging is a framework that helps you load and display pages of data from a larger dataset from local storage or over network.

Swift Paging is a framework that helps you load and display pages of data from a larger dataset from local storage or over network. This approach allows your app to use both network bandwidth and system resources more efficiently. It's built on top of Combine, allowing you to harness its full power, handle errors easily, etc.

Feb 7, 2022

💧 A server-side Swift web framework.

💧 A server-side Swift web framework.

Vapor is a web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website, API, or cloud project. Take

Aug 12, 2022

A Swift web framework and HTTP server.

A Swift web framework and HTTP server.

A Swift Web Framework and HTTP Server Summary Kitura is a web framework and web server that is created for web services written in Swift. For more inf

Aug 9, 2022

A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X

IMPORTANT! We don't see any way how to make web development as great as Ruby on Rails or Django with a very static nature of current Swift. We hope th

Aug 6, 2022

A minimal, fast and unopinionated web framework for Swift

![Fire Image] (http://i.imgur.com/1qR6Nl4.png) Blackfire An extremely fast Swift web framework 🔥 Getting Started If you're familiar with express.js t

Aug 6, 2022

An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps

PeerKit An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps Usage // Automatically detect and attach to

Jun 29, 2022

A Swift Multiplatform Single-threaded Non-blocking Web and Networking Framework

A Swift Multiplatform Single-threaded Non-blocking Web and Networking Framework

Serverside non-blocking IO in Swift Ask questions in our Slack channel! Lightning (formerly Edge) Node Lightning is an HTTP Server and TCP Client/Serv

Jun 29, 2022

Super lightweight web framework in Swift based on SWSGI

Ambassador Super lightweight web framework in Swift based on SWSGI Features Super lightweight Easy to use, designed for UI automatic testing API mocki

Jul 8, 2022

DispatchSource based socket framework written in pure Swift

SwiftDSSocket Overview SwiftDSSocket is a purely swift based asynchronous socket framework built atop DispatchSource. Function signatures are pretty m

Apr 24, 2022
Swift-multipart-formdata - MultipartFormData: Build multipart/form-data type-safe in Swift

MultipartFormData Build multipart/form-data type-safe in Swift. A result builder

Jul 21, 2022
A type-safe, high-level networking solution for Swift apps
A type-safe, high-level networking solution for Swift apps

What Type-safe network calls made easy Netswift offers an easy way to perform network calls in a structured and type-safe way. Why Networking in Swift

Apr 27, 2022
Commonly available global error type packages

ErrorKit 일반적으로 사용 할 수 있는 전역 오류 타입 패키지. Requirements Xcode 13.2.1+ Swift 5.5+ Ins

Dec 21, 2021
A peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework

This repository is a peer to peer framework for OS X, iOS and watchOS 2 that presents a similar interface to the MultipeerConnectivity framework (which is iOS only) that lets you connect any 2 devices from any platform. This framework works with peer to peer networks like bluetooth and ad hoc wifi networks when available it also falls back onto using a wifi router when necessary. It is built on top of CFNetwork and NSNetService. It uses the newest Swift 2's features like error handling and protocol extensions.

Jun 18, 2022
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)

Perfect: Server-Side Swift 简体中文 Perfect: Server-Side Swift Perfect is a complete and powerful toolbox, framework, and application server for Linux, iO

Aug 12, 2022
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-5.1

Aug 3, 2022
Swift backend / server framework (Pure Swift, Supports Linux)

NetworkObjects NetworkObjects is a #PureSwift backend. This framework compiles for OS X, iOS and Linux and serves as the foundation for building power

Aug 6, 2022
OAuth2 framework for macOS and iOS, written in Swift.
OAuth2 framework for macOS and iOS, written in Swift.

OAuth2 OAuth2 frameworks for macOS, iOS and tvOS written in Swift 5.0. ⤵️ Installation ?? Usage ?? Sample macOS app (with data loader examples) ?? Tec

Aug 3, 2022
Swift/Obj-C HTTP framework with a focus on REST and JSON

Now Archived and Forked PMHTTP will not be maintained in this repository going forward. Please use, create issues on, and make PRs to the fork of PHMT

Jul 31, 2022
A Swift framework for working with emails
A Swift framework for working with emails

Postal is a swift framework providing simple access to common email providers. Example Connect let postal = Postal(configuration: .icloud(login: "myem

Aug 7, 2022