#Is there a guide or any resource for WebSocket client protocol?

15 messages · Page 1 of 1 (latest)

vernal sapphire
#

I am looking for guide or any resource for WebSocket client protocol, there are a few, but they only seem to implement server protocol and use the web API (WebSocket) for client instead. So are there any good resources for WebSocket client protocol except the spec (which is a nightmare)?

karmic lark
#

It's the gold-standard client & server impl, almost everyone using websockets in Go uses this library

vernal sapphire
karmic lark
#

I'm not sure what you want

vernal sapphire
#

The structure is a little too complicated

karmic lark
#

What is your goal

vernal sapphire
#

I want to implement just the client protocol

karmic lark
#

From scratch?

vernal sapphire
#

Yeah

karmic lark
#

Any particular reason or you just want to learn about it?

vernal sapphire
#

Just for learning

#

I got connection working, but I don't understand the reading messages part, the spec is unnecessarily complicated

karmic lark
#

Then your best resources are going to be spec and source. I don't think the relevant parts of gorilla/websocket are as complex as you're making out. Is there anything in particular you're struggling with? Because not liking the way it's structured doesn't mean you can't learn from it

vernal sapphire
#

I have setup a TCP connection, but I cannot understand the message parsing stuff