connect method

Future<WsConnection> connect(
  1. String nodeUId, {
  2. int maxFrameBytes = WsLimits.defaultMaxFrameBytes,
})

A raw connection to this hub, already authenticated as nodeUId.

For tests that drive the wire protocol directly rather than through a session.

Implementation

Future<WsConnection> connect(
  String nodeUId, {
  int maxFrameBytes = WsLimits.defaultMaxFrameBytes,
}) async {
  final connection = WsConnection(
    uri,
    credentials: credentials,
    maxFrameBytes: maxFrameBytes,
  );
  await connection.connect(nodeUId: nodeUId);
  return connection;
}