I'm using SocketRocket with the Xamarin wrapper you have provided. I'm filing this bug with you because I think it's more likely that the bug is with your code than theirs.
I new up an instance of the SocketRocket client per the documentation. It works fine, submits a GET request to the server, and things proceed nicely.
Then I command-home the app, wait till things time out, and bring the app up out of the background. In that case I've coded the app to reconstruct the SR client from scratch (per documentation and various examples I've found).
When I do this, it submits the same GET request to the server, but the first line of the handshake data is corrupted. It should come through as "GET HTTP 1.1" or similar. Instead, it's coming through as "<garbage>GET HTTP 1.1", where <garbage> == an ASCII rendering of some obviously unintended stuff.
If I kill the app and restart it, the request is correct. That's why I'm blaming the client and not the server.
I really don't know the problem is in the Xamarin wrapper, but frankly I can't believe this use case hasn't been hammered on by the community that's using SocketRocket.
Here's version my version info. I'm using the latest versions of all of the libraries involved.
=== Visual Studio Professional 2017 for Mac ===
Version 7.0.1 (build 24)
Installation UUID: 80bdf4df-6962-44ea-9d7f-e27c65860cbf
Mono 18.104.22.168 (2017-02/5077205) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500010001
=== NuGet ===
=== .NET Core ===
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 22.214.171.124 (Visual Studio Professional)
Android SDK: /Users/jblackburn/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.3
Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Android Designer EPL code available here:
=== Apple Developer Tools ===
Xcode 8.3.3 (12175.1)
=== Xamarin.iOS ===
Version: 10.10.0.36 (Visual Studio Professional)
Build date: 2017-05-22 16:30:53-0400
=== Xamarin Inspector ===
Build date: Fri, 21 Apr 2017 17:57:12 GMT
=== Xamarin.Mac ===
Version: 126.96.36.199 (Visual Studio Professional)
=== Build Information ===
Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2
=== Operating System ===
Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
Thu Jun 15 17:36:27 PDT 2017
Would you be able to provide a simple repro project that demonstrates the issue?
As @Tim requested, would be nice to have a project that can be used for testing. If you have found a workaround or the reason for the bug we would also appreciate the info.