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

Cannot send more than 16 MiB in a single message #475

Closed
1 of 2 tasks
lpinca opened this issue Jan 23, 2017 · 1 comment
Closed
1 of 2 tasks

Cannot send more than 16 MiB in a single message #475

lpinca opened this issue Jan 23, 2017 · 1 comment
Milestone

Comments

@lpinca
Copy link
Contributor

lpinca commented Jan 23, 2017

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

It is not possible to send more that 16 MiB of data in a single message

Steps to reproduce (if the current behaviour is a bug)

Run the following test case

'use strict';

const eioc = require('engine.io-client');
const eio = require('engine.io');
const http = require('http');

const server = http.createServer();
const engine = eio.attach(server, {
  maxHttpBufferSize: 20 * 1024 * 1024
});

engine.on('connection', (socket) => {
  socket.on('message', (data) => console.log(data.length));
});

server.listen(3000, () => {
  const socket = eioc('http://localhost:3000', {
    perMessageDeflate: false,
    transports: ['websocket']
  });

  socket.on('open', () => {
    socket.send('A'.repeat(17 * 1024 * 1024));
  });

  socket.on('close', () => console.log('close'));
});

Expected behaviour

The message event should be emitted on the server and 17825792 logged on the console.

Setup

  • OS: macOS
  • browser: -
  • engine.io version: 2.0.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

The issue seems to be caused by uws which apparently ignores the maxHttpBufferSize option and hardcodes its value to 16 MiB. The above example works as expected with engine.io@1.8.x.

@darrachequesne
Copy link
Member

Closed by #501.

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

No branches or pull requests

2 participants