Skip to content

Commit

Permalink
Add docs to the client
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Nov 2, 2024
1 parent e47ed27 commit 4780cf8
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/NATS.Client.Simplified/NatsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,25 @@ public class NatsClient : INatsClient
/// <summary>
/// Initializes a new instance of the <see cref="NatsClient"/> class.
/// </summary>
/// <param name="url">NATS server URL</param>
/// <param name="name">Client name</param>
/// <param name="credsFile">Credentials filepath</param>
/// <param name="url">NATS server URL to connect to. (default: nats://localhost:4222)</param>
/// <param name="name">Client name. (default: NATS .NET Client)</param>
/// <param name="credsFile">Credentials filepath.</param>
/// <remarks>
/// <para>
/// You can set more than one server as seed servers in a comma-separated list in the <paramref name="url"/>.
/// The client will randomly select a server from the list to connect.
/// </para>
/// <para>
/// User-password or token authentication can be set in the <paramref name="url"/>.
/// For example, <c>nats://derek:s3cr3t@localhost:4222</c> or <c>nats://token@localhost:4222</c>.
/// You should URL-encode the username and password or token if they contain special characters.
/// </para>
/// <para>
/// If multiple servers are specified and user-password or token authentication is used in the <paramref name="url"/>,
/// only the credentials in the first server URL will be used; credentials in the remaining server
/// URLs will be ignored.
/// </para>
/// </remarks>
public NatsClient(
string url = "nats://localhost:4222",
string name = "NATS .NET Client",
Expand Down

0 comments on commit 4780cf8

Please sign in to comment.