connectStomp method

Future<StompClient> connectStomp({
  1. required PeerId peerId,
  2. required String hostName,
  3. String? login,
  4. String? passcode,
  5. Duration? timeout,
})

Creates a STOMP client connection to a peer

Implementation

Future<StompClient> connectStomp({
  required PeerId peerId,
  required String hostName,
  String? login,
  String? passcode,
  Duration? timeout,
}) async {
  final client = StompClient(
    host: this,
    serverPeerId: peerId,
    hostName: hostName,
    login: login,
    passcode: passcode,
    timeout: timeout ?? StompConstants.defaultTimeout,
  );

  await client.connect();
  return client;
}