Skip to content

Handle data callback #2

Description

@martinlevesque

Hey,

Great package! It would be nice to add a config handler whenever any data on a hostname is transfered, example:

let myConfig = [
    {
        name: 'app-1',
        hostnames: [ 'test.myhost.com' ],
        endpoint: { host: '127.0.0.1', port: 3001 },
        dataHandler: function(socket, data) {
             // do something...
        }
    },
      {
          name: 'app-2',
          hostnames: [ 'test2.myhost.com' ],
          endpoint: { host: '127.0.0.1', port: 3002 }
      }
  ];

I need it to calculate the bandwidth usage per hostname, so I would sum the data bytes transferred. It could be useful for other purposes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions