Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send: support ArrayBufferView as argument #78

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

mstoykov
Copy link
Collaborator

What?

Support ArrayBufferViews in send

Why?

It is part of the specification and seems like it is fairly used.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make test) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

fixes #75

@mstoykov mstoykov requested a review from a team as a code owner September 10, 2024 13:34
@mstoykov mstoykov requested review from olegbespalov and joanlopez and removed request for a team September 10, 2024 13:34
rt := w.vu.Runtime()
isView, err := isArrayBufferView(rt, msg)
if err != nil {
common.Throw(rt, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe wrap an error here since it's user-facing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 9ecfa9f

Base automatically changed from defaultToBlob to main September 10, 2024 14:23
Copy link
Contributor

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mstoykov mstoykov merged commit 3079f14 into main Sep 11, 2024
10 checks passed
@mstoykov mstoykov deleted the supportArrayBufferView branch September 11, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need support for []uint8
3 participants