initPusherLaravelEcho method

void initPusherLaravelEcho(
  1. String appKey,
  2. List<LaravelEchoMigration> migrations, {
  3. required String authEndPoint,
  4. Map<String, String> authHeaders = const {'Content-Type' : 'application/json'},
  5. String? cluster,
  6. required String host,
  7. int wsPort = 80,
  8. int wssPort = 443,
  9. bool encrypted = true,
  10. int activityTimeout = 120000,
  11. int pongTimeout = 30000,
  12. int maxReconnectionAttempts = 6,
  13. int maxReconnectGapInSeconds = 30,
  14. bool enableLogging = true,
  15. bool autoConnect = true,
  16. String? nameSpace,
})

Implementation

void initPusherLaravelEcho(
  String appKey,
  List<LaravelEchoMigration> migrations, {
  required String authEndPoint,
  Map<String, String> authHeaders = const {
    'Content-Type': 'application/json'
  },
  String? cluster,
  required String host,
  int wsPort = 80,
  int wssPort = 443,
  bool encrypted = true,
  int activityTimeout = 120000,
  int pongTimeout = 30000,
  int maxReconnectionAttempts = 6,
  int maxReconnectGapInSeconds = 30,
  bool enableLogging = true,
  bool autoConnect = true,
  String? nameSpace,
}) {
  _laravelEcho?.disconnect();
  _laravelEcho = LaravelEcho.pusher(
    this,
    appKey,
    migrations,
    authEndPoint: authEndPoint,
    authHeaders: authHeaders,
    cluster: cluster,
    host: host,
    wsPort: wsPort,
    wssPort: wssPort,
    encrypted: encrypted,
    activityTimeout: activityTimeout,
    pongTimeout: pongTimeout,
    maxReconnectionAttempts: maxReconnectionAttempts,
    maxReconnectGapInSeconds: maxReconnectGapInSeconds,
    enableLogging: enableLogging,
    autoConnect: autoConnect,
    nameSpace: nameSpace,
  );
}