Sends a binary message to the client.
ServerWebSocket.sendBinary method | Bun module | Bun BuildDocsReferenceGuidesBlogDiscord/Bun/ServerWebSocket/sendBinaryMsendBinary BuildDocsReferenceGuidesBlogDiscord /Bun/ServerWebSocket/sendBinaryMsendBinary ServerWebSocket.sendBinarysendBinary(data: BufferSource,compress?: boolean): number; @param data @param compress Referenced typestype BufferSource = NodeJS.TypedArrayArrayBufferLike> | DataViewArrayBufferLike> | ArrayBufferLike
Search the reference...
/
method
The data to send.
Should the data be compressed? If the client does not support compression, this is ignored.
ws.send(new TextEncoder().encode("Hello!"));
ws.send(new Uint8Array([1, 2, 3, 4]), true);
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →ServerWebSocket.sendBinary method | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- API documentation for method bun.ServerWebSocket.sendBinary | Bun