You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the full implementation for NSURLSessionWebSocket based on libcurl's callback based websocket API.
It does not handle all possible scenarios (For example HTTP redirects, cookies), but the basic functionality and Websocket connection protocol is implemented.
I ran a concurrent stress test with this setup, which spawns a dozen thread that hammer multiple WebSocket tasks with requests concurrently and verify some basic invariants (Such as the received / send count, pingpongs and the message sizes / content). The results matched the Apple implementation and the throughput is comparable.
I don't think it makes sense to upstream this setup as a unit test however. Unit testing this implementation is a bit difficult, since you need a client/server connection to do it (Even if just localhost) and testing nontrivial cases is hard.
I realise this is just a draft at this point, but I'm a bit concerned about [Gate WebSocket API on Blocks support] (a882559)
We can't be doing that as GNUstep needs portable code: I'd suggest implementing and testing a non-blocks version first and once that's fully functional, add the blocks API methods needed for OSX compatibility, flagged as non-portable.
Unit testing this implementation is a bit difficult, since you need a client/server connection
to do it (Even if just localhost) and testing nontrivial cases is hard.
I know that libwebsockets comes with a test server and a load of testcases. Perhaps the github workflows could be modified to install/use that for testing (perhaps put it into the testsuite as code to be run only if libwebsockets is available)?
@hmelder Sure. Please reset to a78f913. Everything after are unreviewed LLM attempts of fixing the GCC compatibility, I don't know if any of it is usable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the full implementation for NSURLSessionWebSocket based on libcurl's callback based websocket API.
It does not handle all possible scenarios (For example HTTP redirects, cookies), but the basic functionality and Websocket connection protocol is implemented.
I ran a concurrent stress test with this setup, which spawns a dozen thread that hammer multiple WebSocket tasks with requests concurrently and verify some basic invariants (Such as the received / send count, pingpongs and the message sizes / content). The results matched the Apple implementation and the throughput is comparable.
I don't think it makes sense to upstream this setup as a unit test however. Unit testing this implementation is a bit difficult, since you need a client/server connection to do it (Even if just localhost) and testing nontrivial cases is hard.