StompConfig.sockJS constructor
StompConfig.sockJS({
- required String url,
- Duration reconnectDelay = const Duration(seconds: 5),
- Duration heartbeatIncoming = const Duration(seconds: 5),
- Duration heartbeatOutgoing = const Duration(seconds: 5),
- Duration connectionTimeout = Duration.zero,
- Map<
String, String> ? stompConnectHeaders, - Map<
String, dynamic> ? webSocketConnectHeaders, - StompBeforeConnectCallback beforeConnect = _noOpFuture,
- StompFrameCallback onConnect = _noOp,
- StompFrameCallback onStompError = _noOp,
- StompFrameCallback onDisconnect = _noOp,
- StompFrameCallback onUnhandledFrame = _noOp,
- StompFrameCallback onUnhandledMessage = _noOp,
- StompFrameCallback onUnhandledReceipt = _noOp,
- StompWebSocketErrorCallback onWebSocketError = _noOp,
- StompWebSocketDoneCallback onWebSocketDone = _noOp,
- StompDebugCallback onDebugMessage = _noOp,
Implementation
StompConfig.sockJS({
required this.url,
this.reconnectDelay = const Duration(seconds: 5),
this.heartbeatIncoming = const Duration(seconds: 5),
this.heartbeatOutgoing = const Duration(seconds: 5),
this.connectionTimeout = Duration.zero,
this.stompConnectHeaders,
this.webSocketConnectHeaders,
this.beforeConnect = _noOpFuture,
this.onConnect = _noOp,
this.onStompError = _noOp,
this.onDisconnect = _noOp,
this.onUnhandledFrame = _noOp,
this.onUnhandledMessage = _noOp,
this.onUnhandledReceipt = _noOp,
this.onWebSocketError = _noOp,
this.onWebSocketDone = _noOp,
this.onDebugMessage = _noOp,
}) : useSockJS = true;