SocketClient constructor

SocketClient(
  1. String url, {
  2. String protocol = GraphQLProtocol.graphqlWs,
  3. SocketClientConfig config = const SocketClientConfig(),
  4. @visibleForTesting Uint8List? randomBytesForUuid,
  5. @visibleForTesting void onMessage(
    1. GraphQLSocketMessage
    )?,
  6. @visibleForTesting void onStreamError(
    1. Object error,
    2. StackTrace stackTrace
    ) = _defaultOnStreamError,
})

Implementation

SocketClient(
  this.url, {
  this.protocol = GraphQLProtocol.graphqlWs,
  this.config = const SocketClientConfig(),
  @visibleForTesting this.randomBytesForUuid,
  @visibleForTesting this.onMessage,
  @visibleForTesting this.onStreamError = _defaultOnStreamError,
}) {
  _connect();
}