Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Please provide a WebSocket client example #465
I have started coding a WebSocket client example.
In order to do so, I have written a 'HTTPClientUpgradeHandler' and 'WebClientSocketUpgrader' pair to match the 'HTTPServerUpgradeHandler' and 'WebSocketUpgrader' which already exist to handle the server upgrade. At the moment, I have mostly done this by copying the original pair and then changing/deleting code as required. So there is a decent amount of duplication. I am at the stage where it generally works for the happy path. It is very rough and ready and without any tests. I can post some code if it is felt that would help to understand my description but I am a while away from any proper PR.
Mostly though, before pressing on too much, I was hoping to get feedback this technique. Specifically, I would like to ask if this seems like a generally correct approach? Or might there be a simpler solution that I may have missed?
Also, should I open a separate issue for the client upgrader? #306 seems as related to a client upgrader as this ticket.