websocket
websocket copied to clipboard
the lack of client code
当我使用hertz-contrib/websocket时发现缺少了一些客户端的方法,类似gorilla/websocket中的Dial方法:https://github.com/gorilla/websocket/blob/master/client.go#L116

希望在以后的维护中可以加入有关客户端的方法
Currently, we may not have enough time to put into this.
I will put the good first issue tag for it first.
If you are interested in it, any PR is welcome.
@welkeyever I am new to open source and I had to translate what @cqqqq777 said. So just to confirm that I have understood correctly. We need to add missing client methods in hertz-contrib/websocket, and I can refer to gorilla/websocket. One of them in Dial but we might need others as well. Please tell me if there is anything else in the req.
@shivamganwani Sorry for the late, I just came back from vacation. Yes, it is open to do so like your said - mostly the dial and related APIs - regarding gorilla/websocket. Let me know if you are interested in it, and I will assign it to you🫡
@welkeyever I want to patch hertz/contrib/websocket to support websocket client,based on hertz client,but found it is difficult. because the hertz client do not provide any function to access current connection after response 101 and switch protocol to websocket. what i can do is reading body streamly. Is there any suggestion?
@qleein Good point! It seems like we need to open a door for client to hijack the connection. If you are interested in the follow-up and task dismantling, you may lit up an issue here, and do it. Or I will come back later and take a closer look after the things at hand are over.
Fixed in #24 , check test for example.