A conforming Objective-C WebSocket client library.

Overview

SocketRocket

Platforms License

Podspec Carthage Compatible

Build Status

A conforming WebSocket (RFC 6455) client library for iOS, macOS and tvOS.

Test results for SocketRocket here. You can compare to what modern browsers look like here.

SocketRocket currently conforms to all core ~300 of Autobahn's fuzzing tests (aside from two UTF-8 ones where it is merely non-strict tests 6.4.2 and 6.4.4).

Features/Design

  • TLS (wss) support, including self-signed certificates.
  • Seems to perform quite well.
  • Supports HTTP Proxies.
  • Supports IPv4/IPv6.
  • Supports SSL certificate pinning.
  • Sends ping and can process pong events.
  • Asynchronous and non-blocking. Most of the work is done on a background thread.
  • Supports iOS, macOS, tvOS.

Installing

There are a few options. Choose one, or just figure it out:

Add the following line to your Podfile:

pod 'SocketRocket'

Run pod install, and you are all set.

Add the following line to your Cartfile:

github "facebook/SocketRocket"

Run carthage update, and you should now have the latest version of SocketRocket in your Carthage folder.

  • Using SocketRocket as a sub-project

    You can also include SocketRocket as a subproject inside of your application if you'd prefer, although we do not recommend this, as it will increase your indexing time significantly. To do so, just drag and drop the SocketRocket.xcodeproj file into your workspace.

API

SRWebSocket

The Web Socket.

Note:

SRWebSocket will retain itself between -(void)open and when it closes, errors, or fails. This is similar to how NSURLConnection behaves (unlike NSURLConnection, SRWebSocket won't retain the delegate).

Interface

@interface SRWebSocket : NSObject

// Make it with this
- (instancetype)initWithURLRequest:(NSURLRequest *)request;

// Set this before opening
@property (nonatomic, weak) id <SRWebSocketDelegate> delegate;

// Open with this
- (void)open;

// Close it with this
- (void)close;

// Send a Data
- (void)sendData:(nullable NSData *)data error:(NSError **)error;

// Send a UTF8 String
- (void)sendString:(NSString *)string error:(NSError **)error;

@end

SRWebSocketDelegate

You implement this

@protocol SRWebSocketDelegate <NSObject>

@optional

- (void)webSocketDidOpen:(SRWebSocket *)webSocket;

- (void)webSocket:(SRWebSocket *)webSocket didReceiveMessageWithString:(NSString *)string;
- (void)webSocket:(SRWebSocket *)webSocket didReceiveMessageWithData:(NSData *)data;

- (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;
- (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(nullable NSString *)reason wasClean:(BOOL)wasClean;

@end

Testing

Included are setup scripts for the python testing environment. It comes packaged with vitualenv so all the dependencies are installed in userland.

To run the short test from the command line, run:

  make test

To run all the tests, run:

  make test_all

The short tests don't include the performance tests (the test harness is actually the bottleneck, not SocketRocket).

The first time this is run, it may take a while to install the dependencies. It will be smooth sailing after that.

You can also run tests inside Xcode, which runs the same thing, but makes it easier to debug.

  • Choose the SocketRocketTests target
  • Make sure your running destination is either your Mac or any Simulator
  • Run the test action (⌘+U)

TestChat Demo Application

SocketRocket includes a demo app, TestChat. It will "chat" with a listening websocket on port 9900.

TestChat Server

The sever takes a message and broadcasts it to all other connected clients.

It requires some dependencies though to run. We also want to reuse the virtualenv we made when we ran the tests. If you haven't run the tests yet, go into the SocketRocket root directory and type:

make test

This will set up your virtualenv.

Now, in your terminal:

source .env/bin/activate
pip install git+https://github.com/tornadoweb/tornado.git

In the same terminal session, start the chatroom server:

python TestChatServer/py/chatroom.py

There's also a Go implementation (with the latest weekly) where you can:

cd TestChatServer/go
go run chatroom.go

Chatting

Now, start TestChat.app (just run the target in the Xcode project). If you had it started already you can hit the refresh button to reconnect. It should say "Connected!" on top.

To talk with the app, open up your browser to http://localhost:9000 and start chatting.

WebSocket Server Implementation Recommendations

SocketRocket has been used with the following libraries:

The Tornado one is dirt simple and works like a charm. (IPython notebook uses it too). It's much easier to configure handlers and routes than in Autobahn/twisted.

Contributing

We’re glad you’re interested in SocketRocket, and we’d love to see where you take it. Please read our contributing guidelines prior to submitting a Pull Request.

Comments
  • Stream end encountered

    Stream end encountered

    Hi there,

    I see there is another thread called like mine which is closed (https://github.com/square/SocketRocket/issues/82) but I've the same issue with the use of this project (https://github.com/pkyeck/socket.IO-objc).

    The stream closed after a connexion with Facebook, where I send my accessToken and many data to my socket.io server and when I get my data back and do nothing else, my connexion closed.

    Can you help me with ?

    opened by kevinvavelin 30
  • Add Proxy support

    Add Proxy support

    This pull request added support to use SocketRocket behind http proxy.

    The proxy setting is read from the system configuration. PAC is also supported.

    If there is proxy in the system configuration. Instead open network stream to the web socket server, the network stream to the proxy server is opened. Then we send HTTP CONNECT with the web socket server address to the proxy server. After receiving 200 OK status, it operates like normal network stream.

    CLA Signed 
    opened by oldshuren 23
  • Pluggable, more flexible, security policies.

    Pluggable, more flexible, security policies.

    Motiviation

    Extract @fredericjacobs' CertificateVerifier concept with @nlutsenko's SRSecurityOptions into a pluggable SRSecurityPolicy protocol

    This retains existing SSL configuration code paths, while allowing users more flexibility to specify their own security policy. ~~It's intended that you're able to subclass an AFSecurityPolicy that conforms to the <SRSecurityPolicy> protocol to share policy between websocket and conventional requests.~~ This approach was changed. SRSecurityPolicy is now it's own class.

    Inspired by original "Require TLS 1.2 & enable pinning" pull request by Frederic Jacobs (@fredericjacobs) at: https://github.com/facebook/SocketRocket/pull/274/files

    TODO

    There are a couple things in particular that were kind of quick hacks, but wanted to get some feedback on the approach:

    • [x] Testing
    • [X] I added a synchronized block in didConnect. Maybe we can refactor so this isn't reached at so many different points
    • [x] Should SecurityPolicyBuilder be public?
    • [X] Are you OK with defaulting to TLS 1.2 only?
    • [X] ~~Implement no-encryption debug~~
    CLA Signed 
    opened by michaelkirk 22
  • Crashing at -[SRWebSocket stream:handleEvent:] (SRWebSocket.m:1405)

    Crashing at -[SRWebSocket stream:handleEvent:] (SRWebSocket.m:1405)

    Hi, I'm getting random but continuos (~10-15 a day) crashes on a desktop app I'm working on presently but I couldn't reproduce it myself and it's working for the vast majority of the users.

    So I was wondering if somebody else is seeing this before. I'm using SRWebSocket through libPusher, in case that makes a difference.

    We are using the latest (at least on CocoaPods): pod 'SocketRocket', '0.3.1-beta2'

    Thanks in advance for any help you can provide.

    Crash report:

    Exception Type: SIGSEGV Exception Codes: SEGV_NOOP at 0x0 Crashed Thread: 6

    Thread 6 Crashed: 0 libobjc.A.dylib 0x00007fff8d6c57a2 objc_retain + 18 1 libsystem_blocks.dylib 0x00007fff90313580 _Block_copy_internal + 308 2 libdispatch.dylib 0x00007fff90cee546 _dispatch_Block_copy + 43 3 libdispatch.dylib 0x00007fff90cf413f dispatch_async + 17 4 [MYAPP] 0x000000010ac84303 -SRWebSocket stream:handleEvent: 5 CoreFoundation 0x00007fff8d9a4d51 _signalEventSync + 385 6 CoreFoundation 0x00007fff8d9a4b98 _cfstream_solo_signalEventSync + 328 7 CoreFoundation 0x00007fff8d9a4a0f _CFStreamSignalEvent + 623 8 CFNetwork 0x00007fff8a86327e _ZN30CoreWriteStreamCFStreamSupport20coreStreamWriteEventEP17__CoreWriteStreamm + 102 9 CFNetwork 0x00007fff8a8631ed _ZN21CoreWriteStreamClient25coreStreamEventsAvailableEm + 53 10 CFNetwork 0x00007fff8a9969c5 _ZN14CoreStreamBase14_callClientNowEP16CoreStreamClient + 53 11 CFNetwork 0x00007fff8a88c678 ___ZN14CoreStreamBase34_streamSetEventAndScheduleDeliveryEmh_block_invoke + 33 12 CFNetwork 0x00007fff8a87c40c ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 25 13 CoreFoundation 0x00007fff8d92fcd4 CFArrayApplyFunction + 68 14 CFNetwork 0x00007fff8a87c2eb _ZN19RunloopBlockContext7performEv + 115 15 CFNetwork 0x00007fff8a87c193 _ZN17MultiplexerSource7performEv + 269 16 CFNetwork 0x00007fff8a87bfc2 _ZN17MultiplexerSource8_performEPv + 72 17 CoreFoundation 0x00007fff8d964731 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 18 CoreFoundation 0x00007fff8d955ea2 CFRunLoopDoSources0 + 242 19 CoreFoundation 0x00007fff8d95562f __CFRunLoopRun + 831 20 CoreFoundation 0x00007fff8d9550b5 CFRunLoopRunSpecific + 309 21 Foundation 0x00007fff8ca68adc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 253 22 [MYAPP] 0x000000010ac8546c -_SRRunLoopThread main 23 Foundation 0x00007fff8ca6676b __NSThread__main + 1318 24 libsystem_pthread.dylib 0x00007fff8a43b899 _pthread_body + 138 25 libsystem_pthread.dylib 0x00007fff8a43b72a _pthread_struct_init + 0

    opened by marianoabdala 22
  • Issue #156: Prevents crash in handleEvent method

    Issue #156: Prevents crash in handleEvent method

    We've been seeing crashes with the stack trace posted below. Our app is crashing during a block_copy operation, performed inside the method [SRWebSocket stream:handleEvent:].

    Although i've been unable to directly reproduce this, i've added a couple safety measures that would prevent this from happening.

    Suspected scenario:

    • NSInputStream executes stream:handleEvent: in a BG thread.
    • A the exact same time, SRWebSocket instance gets dealloc'ed.
    • When stream:handleEvent: calls the dispatch_async routine, reference to self is no longer valid.

    Workaround:

    1. Updated stream:handleEvent: method: part of the code was moved to a second method, with a self-strong reference, stored in the stack.
    2. Replaced 'self' with 'weakSelf', when appropriate.
    3. NSStream delegate(s) are now being cleaned up in SocketRocket's NSRunLoop.

    Any feedback will be very welcome. Thanks in advance, and congratulations on building this awesome project!

    Crash Stack Trace:

    Crashed Thread:  3
    
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: EXC_I386_GPFLT
    
    Thread 0:: Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib          0x00007fff894a9a1a mach_msg_trap + 10
    1   libsystem_kernel.dylib          0x00007fff894a8d18 mach_msg + 64
    2   com.apple.CoreFoundation        0x00007fff94743fc5 __CFRunLoopServiceMachPort + 181
    3   com.apple.CoreFoundation        0x00007fff947435e9 __CFRunLoopRun + 1161
    4   com.apple.CoreFoundation        0x00007fff94742f25 CFRunLoopRunSpecific + 309
    5   com.apple.HIToolbox             0x00007fff912eda0d RunCurrentEventLoopInMode + 226
    6   com.apple.HIToolbox             0x00007fff912ed7b7 ReceiveNextEventCommon + 479
    7   com.apple.HIToolbox             0x00007fff912ed5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
    8   com.apple.AppKit                0x00007fff8fc603de _DPSNextEvent + 1434
    9   com.apple.AppKit                0x00007fff8fc5fa2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
    10  com.apple.AppKit                0x00007fff8fc53b2c -[NSApplication run] + 553
    11  com.apple.AppKit                0x00007fff8fc3e913 NSApplicationMain + 940
    12  libdyld.dylib                   0x00007fff8b3c95fd start + 1
    
    Thread 1:: Dispatch queue: com.apple.libdispatch-manager
    0   libsystem_kernel.dylib          0x00007fff894ae662 kevent64 + 10
    1   libdispatch.dylib               0x00007fff91d0743d _dispatch_mgr_invoke + 239
    2   libdispatch.dylib               0x00007fff91d07152 _dispatch_mgr_thread + 52
    
    Thread 2:
    0   libsystem_kernel.dylib          0x00007fff894a9a1a mach_msg_trap + 10
    1   libsystem_kernel.dylib          0x00007fff894a8d18 mach_msg + 64
    2   com.apple.CoreFoundation        0x00007fff94743fc5 __CFRunLoopServiceMachPort + 181
    3   com.apple.CoreFoundation        0x00007fff947435e9 __CFRunLoopRun + 1161
    4   com.apple.CoreFoundation        0x00007fff94742f25 CFRunLoopRunSpecific + 309
    5   com.apple.AppKit                0x00007fff8fe0016e _NSEventThread + 144
    6   libsystem_pthread.dylib         0x00007fff907cc899 _pthread_body + 138
    7   libsystem_pthread.dylib         0x00007fff907cc72a _pthread_start + 137
    8   libsystem_pthread.dylib         0x00007fff907d0fc9 thread_start + 13
    
    Thread 3 Crashed:
    0   libobjc.A.dylib                 0x00007fff88bff7a2 objc_retain + 18
    1   libsystem_blocks.dylib          0x00007fff89371580 _Block_copy_internal + 308
    2   libdispatch.dylib               0x00007fff91d05546 _dispatch_Block_copy + 43
    3   libdispatch.dylib               0x00007fff91d0b13f dispatch_async + 17
    4   com.simperium.Simperium-OSX     0x0000000107fcd3aa -[SRWebSocket stream:handleEvent:] + 801
    5   com.apple.CoreFoundation        0x00007fff94792c81 _signalEventSync + 385
    6   com.apple.CoreFoundation        0x00007fff94792ac8 _cfstream_solo_signalEventSync + 328
    7   com.apple.CoreFoundation        0x00007fff9479293f _CFStreamSignalEvent + 623
    8   com.apple.CFNetwork             0x00007fff949ba16e CoreWriteStreamCFStreamSupport::coreStreamWriteEvent(__CoreWriteStream*, unsigned long) + 102
    9   com.apple.CFNetwork             0x00007fff949ba0dd CoreWriteStreamClient::coreStreamEventsAvailable(unsigned long) + 53
    10  com.apple.CFNetwork             0x00007fff94aeda65 CoreStreamBase::_callClientNow(CoreStreamClient*) + 53
    11  com.apple.CFNetwork             0x00007fff949e3558 ___ZN14CoreStreamBase34_streamSetEventAndScheduleDeliveryEmh_block_invoke + 33
    12  com.apple.CFNetwork             0x00007fff949d32ec ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 25
    13  com.apple.CoreFoundation        0x00007fff9471db44 CFArrayApplyFunction + 68
    14  com.apple.CFNetwork             0x00007fff949d31cb RunloopBlockContext::perform() + 115
    15  com.apple.CFNetwork             0x00007fff949d3073 MultiplexerSource::perform() + 269
    16  com.apple.CFNetwork             0x00007fff949d2ea2 MultiplexerSource::_perform(void*) + 72
    17  com.apple.CoreFoundation        0x00007fff94752661 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    18  com.apple.CoreFoundation        0x00007fff94743d12 __CFRunLoopDoSources0 + 242
    19  com.apple.CoreFoundation        0x00007fff9474349f __CFRunLoopRun + 831
    20  com.apple.CoreFoundation        0x00007fff94742f25 CFRunLoopRunSpecific + 309
    21  com.apple.Foundation            0x00007fff8d0e1adc -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 253
    22  com.simperium.Simperium-OSX     0x0000000107fce528 -[_SRRunLoopThread main] + 291
    23  com.apple.Foundation            0x00007fff8d0df76b __NSThread__main__ + 1318
    24  libsystem_pthread.dylib         0x00007fff907cc899 _pthread_body + 138
    25  libsystem_pthread.dylib         0x00007fff907cc72a _pthread_start + 137
    26  libsystem_pthread.dylib         0x00007fff907d0fc9 thread_start + 13
    
    opened by jleandroperez 20
  • [SRWebSocket _pumpWriting] (SRWebSocket.m:1195)   Crash

    [SRWebSocket _pumpWriting] (SRWebSocket.m:1195) Crash

    my app has this Crash.: 0 libsystem_platform.dylib 0x39627656 0x39626000 + 5718 1 CFNetwork 0x2e912f97 0x2e8de000 + 216983 2 CFNetwork 0x2e912cc3 0x2e8de000 + 216259 3 CFNetwork 0x2e9b6a5d 0x2e8de000 + 887389 4 CFNetwork 0x2e912c13 0x2e8de000 + 216083 5 CFNetwork 0x2e912b83 0x2e8de000 + 215939 6 CoreFoundation 0x2ec64f2b 0x2ec48000 + 118571 7 homework 0x001bec7b -SRWebSocket _pumpWriting 8 homework 0x001bd5e3 -SRWebSocket _writeData: 9 homework 0x001c02c3 -SRWebSocket _sendFrameWithOpcode:data: 10 libdispatch.dylib 0x394fc103 0x394fb000 + 4355 11 libdispatch.dylib 0x39500e77 0x394fb000 + 24183 12 libdispatch.dylib 0x394fdf9b 0x394fb000 + 12187 13 libdispatch.dylib 0x39501751 0x394fb000 + 26449 14 libdispatch.dylib 0x395019d1 0x394fb000 + 27089 15 libsystem_pthread.dylib 0x3962bdff 0x3962b000 + 3583 16 libsystem_pthread.dylib 0x3962bcc4 0x3962b000 + 3268

    opened by liujianan901228 17
  • has anyone encountered NSPOSIXErrorDomain code=61?

    has anyone encountered NSPOSIXErrorDomain code=61?

    I was using SocketRocket for a while and it did work. But now (suddenly) i keep getting this error. I didn't change anything in the way i was connecting earlier.

    Error Domain=NSPOSIXErrorDomain Code=61 "The operation couldn’t be completed. Connection refused" UserInfo=0x6b9cfb0 {}

    I googled around but no luck. does anybody have an idea of why this error should happen?

    opened by oriben2 16
  • Require TLS 1.2 & enable pinning.

    Require TLS 1.2 & enable pinning.

    • Enforce TLS 1.2 connections for secure connections. Prevents downgrade attacks
    • I think a lot of applications are using this library along with AFNetworking or another HTTP library, therefore I abstracted out the pinning so that they can write their own pinning logic according to their needs. It can also help issues like #265 where they might have to allow proxying certificates or others.
    • if ([trustedCertData isEqualToData:certData]) is a very naïve way to do pinning. Certificates might be re-issued and the expiration dates or validation of the domain is done nowhere. It shouldn't matter too much if certificates are pinned but implementers would enjoy getting some more flexibility there.
    opened by FredericJacobs 15
  • New release anytime soon?

    New release anytime soon?

    Any chance of releasing a new version with the latest branch? Last release seems to be quite a while back (Jan 12, 2013)

    Appreciate the efforts. Thanks

    opened by rahulsh1 15
  • Added ability to provide cookies for the web socket connection

    Added ability to provide cookies for the web socket connection

    For web sockets used behind an already authenticated HTTP(S) session you might want to provide the session cookie or other cookies appropriate for the web socket connection (for example Spring's SessionID when connecting to a Spring-authentication java backend server).

    Sample usage for the clients could be:

    [[self webSocket] setRequestCookies:[[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]];
    

    Note that you might want to limit the cookies provided to the WebSocket based on the URL (cookiesForURL:).

    opened by jmkk 15
  • EXC_BAD_ACCESS in closeWithCode

    EXC_BAD_ACCESS in closeWithCode

    I am attempting to connect to a web socket using this library from within a Unity3d application. Shortly after calling Open I get a crash with a EXC_BAD_ACCESS (code=1, address=0x30) on thread 1. I am not sure how to debug this. Here is the code that Xcode shows me.

    - (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;
    {
        assert(code);
        dispatch_async(_workQueue, ^{
            if (self.readyState == SR_CLOSING || self.readyState == SR_CLOSED) {
                return;
            }
    
            BOOL wasConnecting = self.readyState == SR_CONNECTING;
    
    

    I am crashing on the dispatch_async line.

    my code is below

        SRWebSocket *ws =[[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:url]];
        ws.delegate = self;
    
        [ws open];
    

    Am I doing it wrong ?

    bug 
    opened by NVentimiglia 14
  • Crash on iOS 16:CFSocketInvalidate + 132

    Crash on iOS 16:CFSocketInvalidate + 132

    0x00000001f5ae608c 0x1f5ae0000 + 24716 _os_unfair_lock_recursive_abort (in libsystem_platform.dylib) + 36 1 libsystem_platform.dylib 0x00000001f5ae0898 0x1f5ae0000 + 2200 _os_unfair_lock_lock_slow (in libsystem_platform.dylib) + 280 2 CoreFoundation 0x00000001a931d3ec 0x1a924c000 + 857068 CFSocketInvalidate (in CoreFoundation) + 132 3 CFNetwork 0x00000001aa52ce24 0x1aa3c7000 + 1465892 0x0000000187fd8e24 (in CFNetwork) + 36 4 CoreFoundation 0x00000001a9263030 0x1a924c000 + 94256 CFArrayApplyFunction (in CoreFoundation) + 72 5 CFNetwork 0x00000001aa50a9a0 0x1aa3c7000 + 1325472 0x0000000187fb69a0 (in CFNetwork) + 452 6 CoreFoundation 0x00000001a92cad20 0x1a924c000 + 519456 _CFRelease (in CoreFoundation) + 316 7 CoreFoundation 0x00000001a931d724 0x1a924c000 + 857892 CFSocketInvalidate (in CoreFoundation) + 956 8 CFNetwork 0x00000001aa517478 0x1aa3c7000 + 1377400 0x0000000187fc3478 (in CFNetwork) + 488 9 CoreFoundation 0x00000001a928f99c 0x1a924c000 + 276892 _CFStreamClose (in CoreFoundation) + 108 10 xxxx 0x00000001078c1a18 0x107880000 + 268824 -[SRWebSocket _pumpWriting] () (SRWebSocket.m:1152) 11 xxxx 0x00000001078c03b4 0x107880000 + 263092 __30-[SRWebSocket _failWithError:]_block_invoke (in ) (SRWebSocket.m:635)

    opened by dangqiandev 0
  • iOS16.0 线程警告提示

    iOS16.0 线程警告提示

    (NSRunLoop *)runLoop; { dispatch_group_wait(_waitGroup, DISPATCH_TIME_FOREVER); return _runLoop; } pod集成, xcode:14.0,iphone14pro,iOS16.0 ,SocketRocket (0.6.0) 警告提示: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions

    opened by wangjie172767 2
  • The newest version: 0.6.0,  [wss + ip] format to connect, it gets an error: Error Domain=NSOSStatusErrorDomain Code=-9807

    The newest version: 0.6.0, [wss + ip] format to connect, it gets an error: Error Domain=NSOSStatusErrorDomain Code=-9807

    I use the newset version: 0.6.0, and use wss+ip format to connect the websocket, but it give me an error: Error Domain=NSOSStatusErrorDomain Code=-9807 This error seems like the SSL handshake failed.

    But if I changed the version from 0.6.0 to 0.5.1, wss+ip format works fine!

    For example: wss://123.123.123.123/test In 0.5.1, this url can connect to the server successfully, but in 0.6.0, this url will get an error as I mentioned above.

    Please help me to find a solution, how can I fixed it if I want to use the newset version: 0.6.0

    Many thanks

    opened by EddieMa 0
Releases(0.6.0)
Owner
Meta Incubator
We work hard to contribute our work back to the web, mobile, big data, & infrastructure communities. NB: members must have two-factor auth.
Meta Incubator
Starscream is a conforming WebSocket (RFC 6455) library in Swift.

Starscream is a conforming WebSocket (RFC 6455) library in Swift. Features Conforms to all of the base Autobahn test suite. Nonblocking. Everything ha

Dalton 7.5k Jan 7, 2023
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
AQMonitoring - Air Quality Monitoring App to see live AQI and city data/graph in Swift with WebSocket and MVVM architecture

AQMonitoring Air Quality Monitoring App to see live AQI and city data/graph in S

Kajal Nasit 0 Jan 9, 2022
Socket.IO-client for iOS/OS X.

Socket.IO-Client-Swift Socket.IO-client for iOS/OS X.

Socket.IO 4.9k Jan 1, 2023
🔌 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 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

Meta Incubator 9.4k Dec 29, 2022
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

Meta Incubator 9.4k Dec 29, 2022
SwiftWebSocket - Conforming WebSocket (RFC 6455) client library for iOS and Mac OSX.

SwiftWebSocket Conforming WebSocket (RFC 6455) client library for iOS and Mac OSX. SwiftWebSocket passes all 521 of the Autobahn's fuzzing tests, incl

Josh Baker 1.5k Jan 5, 2023
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
Starscream is a conforming WebSocket (RFC 6455) library in Swift.

Starscream is a conforming WebSocket (RFC 6455) library in Swift. Features Conforms to all of the base Autobahn test suite. Nonblocking. Everything ha

Dalton 7.5k Jan 7, 2023
JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.

JSPatch 中文介绍 | 文档 | JSPatch平台 请大家不要自行接入 JSPatch,统一接入 JSPatch 平台,让热修复在一个安全和可控的环境下使用。原因详见 这里 JSPatch bridges Objective-C and JavaScript using the Object

bang 11.4k Jan 1, 2023
Library of Swiftui Views conforming to Codable, meaning we can produce JSON driven UI!

CodableView Library of Swiftui Views conforming to Codable, meaning we can produce JSON driven UI! Adding a CodableView Type Create View that conforms

Daniel Bolella 3 Apr 2, 2022
WebSocket implementation for use by Client and Server

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

Zewo Graveyard 63 Jan 29, 2022
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
A csv parser written in swift conforming to rfc4180

CSwiftV A csv parser conforming (and tested as much) to rfc4180 i.e the closest thing to a csv spec. It is currently all in memory so not suitable for

Daniel Haight 166 Dec 13, 2022
Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Easy and lightweight network layer for creating different set of network requests like GET, POST, PUT, DELETE customizable with coders conforming to TopLevelDecoder, TopLevelEncoder

Igor 2 Sep 16, 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
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
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
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