Fix a few for Example2
This commit is contained in:
parent
3a31cd9501
commit
b4eb9ead87
@ -19,12 +19,13 @@ namespace Example2
|
||||
|
||||
public Chat (string prefix)
|
||||
{
|
||||
_prefix = prefix ?? "anon#";
|
||||
_prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
|
||||
}
|
||||
|
||||
private string getName ()
|
||||
{
|
||||
return Context.QueryString ["name"] ?? (_prefix + getNum ());
|
||||
var name = Context.QueryString ["name"];
|
||||
return !name.IsNullOrEmpty () ? name : (_prefix + getNum ());
|
||||
}
|
||||
|
||||
private static int getNum ()
|
||||
|
@ -10,8 +10,8 @@ namespace Example2
|
||||
{
|
||||
var name = Context.QueryString ["name"];
|
||||
var msg = !name.IsNullOrEmpty ()
|
||||
? String.Format ("'{0}' to {1}", e.Data, name)
|
||||
: e.Data;
|
||||
? String.Format ("'{0}' to {1}", e.Data, name)
|
||||
: e.Data;
|
||||
|
||||
Send (msg);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace Example2
|
||||
//var wssv = new WebSocketServer ("ws://localhost:4649");
|
||||
//var wssv = new WebSocketServer ("wss://localhost:4649"); // For Secure Connection
|
||||
#if DEBUG
|
||||
// Changing logging level
|
||||
// Changing the logging level
|
||||
wssv.Log.Level = LogLevel.Trace;
|
||||
#endif
|
||||
/* For Secure Connection
|
||||
|
Loading…
Reference in New Issue
Block a user