Swiftpack.co - swift-libp2p/swift-libp2p-tcp as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swift-libp2p.
swift-libp2p/swift-libp2p-tcp 0.0.1
TCP Networking Protocol (Embedded)
⭐️ 0
🕓 6 days ago
iOS macOS
.package(url: "https://github.com/swift-libp2p/swift-libp2p-tcp.git", from: "0.0.1")

LibP2PTCP (Embedded)

Swift Package Manager compatible

TCP Client and Server Transport for Libp2p

Note:

Table of Contents

Overview

TCP is one of the most widely used internet transport protocols. It's what protocols such as HTTP1/2 and Websockets are built upon. This package lets you have access to both a TCP Client, in order to make outbound TCP requests, and a TCP Server, in order to respond to inbound TCP Requests.

Install

Heads up ‼️

  • This package is embedded into swift-libp2p, there's no need to explicitly include this package in your swift-libp2p project. Include the following dependency in your Package.swift file
let package = Package(
    ...
    dependencies: [
        ...
        .package(url: "https://github.com/swift-libp2p/swift-libp2p-tcp.git", .upToNextMajor(from: "0.0.1"))
    ],
    ...
        .target(
            ...
            dependencies: [
                ...
                .product(name: "LibP2PTCP", package: "swift-libp2p-tcp"),
            ]),
    ...
)

Usage

Heads up ‼️

  • This package is embedded into swift-libp2p, there's no need to explicitly include this package in your swift-libp2p project.

Example

TODO


import LibP2PTCP

/// When you configure your app
app.transports.use(.tcp)
app.servers.use(.tcp)
app.clients.use(.tcp)

API

N/A

Contributing

Contributions are welcomed! This code is very much a proof of concept. I can guarantee you there's a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critques, are welcome!

Let's make this code better together! 🤝

Credits

License

MIT © 2022 Breth Inc.

GitHub

link
Stars: 0
Last commit: 6 days 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