-
Notifications
You must be signed in to change notification settings - Fork 386
Add ClientManager
usage to management sample
#167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SignalR client output sample: ``` User 'User' with connection id 'CKZhiNk__nyv3Vrz8SnK_Q1448c44c1' connected. User: gets message from service: 'aaa' ``` MessagePublisher output sample: ``` *********Usage********* send user <User Id> <Message> send users <User Id List (Seperated by ',')> <Message> send group <Group Name> <Message> send groups <Group List (Seperated by ',')> <Message> usergroup add <User Id> <Group Name> usergroup remove <User Id> <Group Name> broadcast <Message> close <Connection ID> <Reason> checkexist connection <Connection ID> checkexist user <User ID> checkexist group <Group Name> *********************** > checkexist connection CKZhiNk__nyv3Vrz8SnK_Q1448c44c1 connection 'CKZhiNk__nyv3Vrz8SnK_Q1448c44c1' exists. > checkexist connection CKZhiNk__nyv3Vrz8SnK_Q1448c44c2 connection 'CKZhiNk__nyv3Vrz8SnK_Q1448c44c2' does not exist. > checkexist user User user 'User' exists. > send user User abc send message 'abc' to 'User' ```
4c4b7de
to
cc6b7e2
Compare
ClientManager
usage to management sample
if (ex == null) | ||
{ | ||
Console.WriteLine("If you expect non-null exception, you need to turn on 'EnableDetailedErrors' option during client negotiation."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about simply turn on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnableDetailedErrors
is not recommended by SignalR, so I don't turn on it by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the If you expect non-null exception, you need to turn on
is wierd here, how about making EnableDetailedErrors
an option when you start negotiation server?
}); | ||
``` | ||
`EnableDetailedErrors` defaults to false because these exception messages can contain sensitive information. | ||
## Full Sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about make it in format
EnableDetailedErrors
defaults to false because these exception messages can contain sensitive information.
so that reader can easily get the note
else if (args.Length == 3 && args[0] == "checkexist") | ||
{ | ||
var exist = await publisher.CheckExist(args[1].ToLowerInvariant(), args[2]); | ||
Console.WriteLine(exist ? $"{args[1]} '{args[2]}' exists." : $"{args[1]} '{args[2]}' does not exist."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if (args.Length == 2 && args[0] == "close") | ||
{ | ||
await publisher.CloseConnection(args[1], null); | ||
Console.WriteLine($"Close connection '{args[1]}'."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SignalR client output sample:
MessagePublisher output sample: