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

uServer: accept compression option #634

Closed
wants to merge 1 commit into from

Conversation

yosiat
Copy link
Contributor

@yosiat yosiat commented Jan 9, 2022

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Allow to specify compression option

Other information (e.g. related issues)

#633

darrachequesne pushed a commit that referenced this pull request Jan 14, 2022
You can now pass additional options:

```js
const { App } = require("uWebSockets.js");
const { uServer } = require("engine.io");

const app = new App();
const server = new uServer();

server.attach(app, {
  compression: uWS.DEDICATED_COMPRESSOR_128KB, // defaults to none
  idleTimeout: 60, // defaults to 120
  maxBackpressure: 8 * 1024 // defaults to 1024 * 1024
});

app.listen(3000);
```

Related: #633
@darrachequesne
Copy link
Member

Merged as 49bb7cf. I've only removed the CompressOptions type from the exposed API, so the uWebsockets.js package stays as dev dependency.

Thanks! 👍

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.

2 participants