UDPReader : a simple package for reading udp packets

Related tags

Networking UDPReader
Overview

UDPReader

UDPReader is a simple package for reading udp packets

For Example

        do {
            // Listen
            let reader = try UDPReader(listen: "8081")
            
            while true {
                // Check the result from the client is not nil
                if let data = reader.read(amount: 1024) {
                    print(String(decoding: data, as: UTF8.self), result)
                }
                else {
                    print("Did not read any packets")
                    break
                }
            }

        } catch UDPReaderError.bind(let error) {
            print("Could not bind \(error)")
        } catch UDPReaderError.getAddrInfo(let error) {
            print("Could not get address info \(error)")
        } catch UDPReaderError.socket(let error) {
            print("Could not get socket \(error)")
        } catch UDPReaderError.unknown {
            print("Unkuown socket error")
        } catch {
            print("Unknown error")
        }

Supports MacOS 12 Swift 5.5

You might also like...
A simple OAuth library for iOS with a built-in set of providers
A simple OAuth library for iOS with a built-in set of providers

SwiftyOAuth is a small OAuth library with a built-in set of providers and a nice API to add your owns. let instagram: Provider = .instagram(clientID:

Swift Express is a simple, yet unopinionated web application server written in Swift
Swift Express is a simple, yet unopinionated web application server written in Swift

Documentation h5 align="right"a href="http://demo.swiftexpress.io/"Live 🐧 server running Demo img src="https://cdn0.iconfinder.com/data/icons/

A simple class to check for internet connection availability in Swift.

Reach A simple class to check for internet connection availability in Swift. Works for both 3G and WiFi connections. Install Manually Add the Reach.sw

A simple GCD based HTTP client and server, written in 'pure' Swift
A simple GCD based HTTP client and server, written in 'pure' Swift

SwiftyHTTP Note: I'm probably not going to update this any further - If you need a Swift networking toolset for the server side, consider: Macro.swift

Simple asynchronous HTTP networking class for Swift

YYHRequest YYHRequest is a simple and lightweight class for loading asynchronous HTTP requests in Swift. Built on NSURLConnection and NSOperationQueue

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

A simple HTTP server written in Swift

http4swift http4swift is a tiny HTTP server library for Nest-compatible applications. This project is unstable, and the API might be changed at anytim

Simple Wi-Fi analyzer for macOS
Simple Wi-Fi analyzer for macOS

Wandra Simple Wi-Fi analyzer for macOS built in SwiftUI. It displays your Signal to Noise Ratio and Received Signal Strength. Basestation SSID and MAC

Showcasing simple SwiftUI and networking capabilities

CovidCounts CovidCounts is powered by SwiftUI. It allows a user to view COVID related data for different U.S. States. App Purpose This app is showcasi

Releases(1.0.4)
Owner
leroy
leroy
This package is meant to make http request of an easy way inspiren in the architecture of Moya package

NetworkAgent This package is meant to make http request of an easy way inspiren in the architecture of Moya package. This package is 100% free of depe

Angel Rada 19 Sep 8, 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

Kitura 1.3k Dec 26, 2022
A Swift Package that allows iOS apps to communicate with AltServer.

AltKit allows apps to communicate with AltServers on the same WiFi network and enable features such as JIT compilation.

Riley Testut 45 Sep 8, 2022
This is my attempt to make this repo available on swift package manager

Parse LiveQuery Client for iOS/OSX PFQuery is one of the key concepts for Parse. It allows you to retrieve PFObjects by specifying some conditions, ma

Benji 0 Nov 3, 2021
Swift package for adding API Key requirement to vapor backends.

APIKeyMiddleware Swift package for adding API Key requirement to vapor backends. Features ✅ Supports an array of keys ✅ Supports overriding thrown err

null 2 Dec 9, 2021
Create xcframework zip archive for Swift binary package.

xczip xczip - create xcframework zip archive for swift binary package. Creates an xcframework archive with a stable checksum that does not change when

Dmitriy Borovikov 0 Jan 8, 2022
AsyncWebSocketClient - A package that contains a client behaving as a wrapper for the URLSessionWebSocketTask

(WORK IN PROGRESS) AsyncWebSocketClient This is a package that contains a client

null 3 Dec 30, 2022
APIProvider - API Provider Package for easier API management inspired by abstraction

APIProvider Using APIProvider you can easily communicate with all API endpoints

null 1 Apr 21, 2022
UnsplashProvider - A package that can use the Unsplash API. It was developed as a SwiftUI

UnsplashProvider It is a package that can use the Unsplash API. It was developed

jasu 12 Dec 20, 2022
NotionDrive - A swift package that can upload files to Notion.so or download files from Notion.so

NotionDrive NotionDrive is a swift package that can upload files to Notion.so or

Underthestars-zhy 4 Apr 9, 2022