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 = const Duration(),
- 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 String url,
this.reconnectDelay = const Duration(seconds: 5),
this.heartbeatIncoming = const Duration(seconds: 5),
this.heartbeatOutgoing = const Duration(seconds: 5),
this.connectionTimeout = const Duration(),
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,
url = SockJsUtils().generateTransportUrl(url);