wintercg / proposal-sockets-api

Proposal for an API for establishing TCP connections in Non-Browser JavaScript runtime environments
https://sockets-api.proposal.wintercg.org/
Other
46 stars 2 forks source link

Writable and Readable QueuingStrategies #20

Open jasnell opened 1 year ago

jasnell commented 1 year ago

Because the socket API builds on the streams spec, it would be helpful for performance tuning to be able to specify the readable and writable queuing strategies. For example,

const socket = connect('https://example.org', {
  writableStrategy: { highWaterMark: 4096 },
  readableStrategy: { highWaterMark: 4096 },
});