WebSocket implementation for use by Client and Server

Related tags

Networking WebSocket
Overview

WebSocket

Swift Zewo Platform License Slack Travis Codebeat

⚠️ This module contains no networking. To create a WebSocket Server, see WebSocketServer. To create a WebSocket Client, see WebSocketClient.

Installation

import PackageDescription

let package = Package(
    dependencies: [
        .Package(url: "https://github.com/Zewo/WebSocket.git", majorVersion: 0, minor: 14),
    ]
)

Support

If you need any help you can join our Slack and go to the #help channel. Or you can create a Github issue in our main repository. When stating your issue be sure to add enough details, specify what module is causing the problem and reproduction steps.

Community

Slack

The entire Zewo code base is licensed under MIT. By contributing to Zewo you are contributing to an open and engaged community of brilliant Swift programmers. Join us on Slack to get to know us!

License

This project is released under the MIT license. See LICENSE for details.

Comments
  • Timeout should be parameter

    Timeout should be parameter

    problem

    5.seconds.fromNow() is too short for slack webSockecet Client. Usually many server is use 20 second ping/pong setting, so it should be longer than that. Otherwise it throw SocketConnectionError

    Slack send ping pong like 20 second interval, so for websockets, this should be like 1.minute.fromNow().

    Fix

    This PR made deadline (timeout second) to be parameter. Default timeout parameter is now 60.seconds

    Result

    I’ve tested and 5.seconds throw SocketConnectionError, 60.seconds.fromNow() can keep connection at least 2-3 hours

    Merge-ability

    This adds connectionTimeout parameter on WebSocket Class but it has default value so it should not make API conflict or changes. Should be safe to tag it.

    opened by tomohisa 5
  • Fix problem generating size of extended payload in Frame when payload is more than 125 chars.

    Fix problem generating size of extended payload in Frame when payload is more than 125 chars.

    When the payload to a web socket frame is greater than 125, the extended payload length needs to be added in the Frame. currently, it mis-generates the size leading to the socket hanging on the receiver side (as it's expecting more data to come). This problem only happens from 0.13 -> 0.14.2 included.

    opened by ratranqu 1
  • Close event as a struct

    Close event as a struct

    This pr introduces WebSocket.Close:

    public struct Close {
        
        public var code: CloseCode?
        public var reason: String?
        
    }
    

    Which also is Error (LocalizedError on macOS and Error on Linux). The reason for this is so that information about close can be passed as Error, which might be useful in a lot of cases

    opened by dreymonde 0
  • Master

    Master

    Problem

    HTTPSClient can not instantiate

    Reason

    HTTPSClient throw httpsSchemeRequired (new to 0.5.4)

    fix

    send https or http depends on wss or ws also added uri init to match with HTTPSClient style

    opened by tomohisa 0
  • Update README URLs based on HTTP redirects

    Update README URLs based on HTTP redirects

    Created with https://github.com/dkhamsing/frankenstein

    GitHub Corrected URLs

    | Was | Now | | --- | --- | | https://github.com/Zewo/Epoch | https://github.com/Zewo/Zewo |

    Other Corrected URLs

    | Was | Now | | --- | --- | | https://www.github.com/Zewo/Epoch | https://github.com/Zewo/Zewo |

    opened by ReadmeCritic 0
Releases(0.14.3)
Owner
Zewo Graveyard
Zewo Deprecated Modules
Zewo Graveyard
Cross-platform JsonRPC client implementation with HTTP and WebSocket support

JsonRPC.swift Cross-platform JsonRPC client implementation with HTTP and WebSocket support Getting started Installation Package Manager Add the follow

Tesseract 5 Oct 19, 2022
Enable WebSocket in OPC DA/AE Server with JSON return, first time ever

WebSocket4OPC Enable WebSocket in OPC DA/AE Server with JSON return, first time ever DCOM was developed more than 2 decades ago, wich was the pillar o

null 13 Dec 14, 2022
Conforming WebSocket (RFC 6455) client library for iOS and Mac OSX

SwiftWebSocket Conforming WebSocket (RFC 6455) client library for iOS and Mac OS

null 0 Dec 24, 2021
A conforming Objective-C WebSocket client library.

SocketRocket A conforming WebSocket (RFC 6455) client library for iOS, macOS and tvOS. Test results for SocketRocket here. You can compare to what mod

Facebook Incubator 9.4k Dec 27, 2022
WebSocket(RFC-6455) library written using Swift

DNWebSocket Object-Oriented, Swift-style WebSocket Library (RFC 6455) for Swift-compatible Platforms. Tests Installation Requirements Usage Tests Conf

Gleb Radchenko 36 Jan 29, 2022
Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM

AQI Simple iOS app in Swift to show AQI for some cities using websocket using Combine + MVVM This app follows MVVM This app uses combine framework The

Amey Vikkram Tiwari 2 Nov 6, 2022
OBSwiftSocket is a Swift library to be used for communication with OBS Studio via obs-websocket (v5).

OBSwiftSocket OBSwiftSocket is a Swift library to be used for communication with OBS Studio via obs-websocket (v5). obs-websocket v5 specification: ht

Edon 3 Sep 28, 2022
🔌 Non-blocking TCP socket layer, with event-driven server and client.

Original authors Honza Dvorsky - http://honzadvorsky.com, @czechboy0 Matthias Kreileder - @matthiaskr1 At the request of the original authors, we ask

Vapor Community 574 Dec 7, 2022
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

Always Right Institute 116 Aug 6, 2022
Minecraft server RCON client for iOS/macOS

iRCON Minecraft server RCON client for iOS/macOS. Features Full remote console window Player list with ability to easily op, kick, ban, etc. Quickly s

JackMacWindows 7 Dec 26, 2022
Language Server Protocol (LSP) client for Swift

LanguageClient This is a Swift library for abstracting and interacting with language servers that implement the Language Server Protocol. It is built

Chime 35 Jan 1, 2023
Twitter-Client - A twitter client that allow users to view tweets on their iphone

Project 3 - Twitter Client Name of your app is a basic twitter app to read your

null 0 Feb 7, 2022
Easy to use SMJobBless, along with a full Swift implementation of the Authorization Services and Service Management frameworks

Leverage SMJobBless functionality with just one function call: let message = "Example App needs your permission to do thingamajig." let icon = Bundle.

null 20 Dec 23, 2022
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

PerfectlySoft Inc. 13.9k Jan 6, 2023
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

Kitura 7.6k Jan 6, 2023
Lightweight library for web server applications in Swift on macOS and Linux powered by coroutines.

Why Zewo? • Support • Community • Contributing Zewo Zewo is a lightweight library for web applications in Swift. What sets Zewo apart? Zewo is not a w

Zewo 1.9k Dec 22, 2022
A place to share code and server configurations in support of the networkQuality tool

Network Quality Server Welcome! The Network Quality Server project was created as a place to share example servers that can used by the networkQuality

null 99 Jan 3, 2023
A tool to build projects on MacOS and a remote linux server with one command

DualBuild DualBuild is a command line tool for building projects on MacOS and a remote Linux server. ##Setup Install the repository git clone https://

Operator Foundation 0 Dec 26, 2021
Setup your class structure in Xcode Interface Builder and save() in Parse Server.

ISParseBind With ISParseBind you can save, update and query PFObjects using the power of Xcode Interface Builder resources. https://www.youtube.com/wa

Weni 10 Mar 28, 2022