AudioWebSocketServer constructor

AudioWebSocketServer({
  1. int port = 8081,
  2. required void audioClientListCallBack(
    1. List<WebSocket> clients
    ),
})

Constructor for AudioWebSocketServer that initializes the server with a port and a command callback function.

port: The port number on which the WebSocket server will listen. Default is 8080. cmdCallBackFunction: A function that will be called whenever a message is received from any client.

Implementation

AudioWebSocketServer({
  this.port = 8081,
  required this.audioClientListCallBack,
});