Skip to content

Add response Ack in socket.prependAnyOutgoing() #4649

Open
@NguyenVanCong1902

Description

@NguyenVanCong1902

I'm using

  socket.use(([event, ...args], next) => {
    incommingEventFilter(socket, [event, args], next);
  });
  socket.prependAnyOutgoing(outgoingEventFilter);

to filter and log all income & outgoing event;

It work well...but...

Client-Side:

socket.emitWithAck("hello", "world", (err, val) => {
  //...
});

Server-Side:

socket.on("hello", (arg, callback) => {
    console.log(arg); // "world"
    callback("got it");
});

In postman client, i received event 'hello' with data 'got it';

The one thing is event 'hello' with 'got it' was not logged by socket.prependAnyOutgoing()

Describe the solution you'd like
Please add callback Ack to socket.prependAnyOutgoing() or is there any way to log all callback Ack 🤔🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions