Question about iolists
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- elixir
- Domain
- networking
Research direction
Start in lib/mint/web_socket/frame.ex around the is_friendly_frame guard at line 67, then read the encode path for {:binary, data}. Determine whether the WebSocket protocol and this library can accept iodata; the issue does not specify an implementation, tests, or a definition of done.
Written by the indexing model from the issue text.
Description
Hey all, thanks for the library. I don't have an issue to report, just a question.
I see that the signature of encode, specifically for a {:binary, data} payload requires that data be a binary, via the is_binary guard in the is_friendly_frame guard:
https://github.com/elixir-mint/mint_web_socket/blob/main/lib/mint/web_socket/frame.ex#L67
Is this requirement for the data to be strictly a binary rather than iodata broadly due to something in the websocket protocol itself? I don't know the inner workings of the websocket protocol and I'm accustomed to using iolists via gentcp, etc., for performance, so I'm just curious if it would ever be possible to send an iolist in this library (or any others).
Thank you!
- Dominant language
- Elixir
- Stars
- 151
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elixir-mint/mint_web_socket
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
elixir-mint/mint_web_socket#42 · 4 comments ·
All issues in elixir-mint/mint_web_socket
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
carverauto/serviceradar#4542 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
phoenixframework/phoenix#6847 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
beyond-all-reason/teiserver#1584 ·