This PR provides an initial implementation of the client WebSockets library for Unix. It's actually not Unix-specific, and rather is a managed implementation on top of System.Net.Sockets and System.Net.Security.
I opted to start with a managed implementation as there does not appear to be a universally-adopted native implementation we can utilize. I looked to see if we could just adopt the Mono implementation, but it's based on HttpWebRequest, which in corefx is built on top of HttpClient, which isn't particularly amenable to being used for websockets (and libcurl does not have websockets support).
This is passing all of the unit/functional tests, including a few more I added. It's also passing all of the AutobahnWS tests (two with non-strict results), except for the compression ones, as that's not implemented.
I've spent close to zero time looking at performance; I'm sure there are opportunities to make meaningful improvements, but for now I've opted for simplicity and functionality. There are also two features I didn't implement: proxies and credentials... but it doesn't look like either the WinHttp or WinRT implementations pay attention to those either.
Commit migrated from https://github.com/dotnet/corefx/commit/b726c18227cf1c3cee21df86d762d557fd81a5e1
* Port some of the ToF ClientWebSocket tests that talk to a real websocket server
* Cleanup naming of existing tests to conform to System.Net test method naming
* Skip tests if not supported on platform. Specifically, these tests were failing
on Win7 since Win7 does not support WinHttp WebSockets. We haven't really noticed this
failing since the CI doesn't yet run Win7 tests (issue dotnet/corefx#4468)
I plan to port the remainder of the ToF websocket related tests in a subsequent PR.
Commit migrated from https://github.com/dotnet/corefx/commit/5006756101cab2edb9bb40590542d7a3df15f0cc