Fix a few for Example3
This commit is contained in:
parent
b4eb9ead87
commit
0cb2335b48
@ -19,12 +19,13 @@ namespace Example3
|
||||
|
||||
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 Example3
|
||||
{
|
||||
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 Example3
|
||||
_httpsv = new HttpServer (4649);
|
||||
//_httpsv = new HttpServer (4649, true); // For Secure Connection
|
||||
#if DEBUG
|
||||
// Changing logging level
|
||||
// Changing the logging level
|
||||
_httpsv.Log.Level = LogLevel.Trace;
|
||||
#endif
|
||||
/* For Secure Connection
|
||||
@ -39,7 +39,7 @@ namespace Example3
|
||||
// Not to remove inactive clients in WebSocket services periodically
|
||||
//_httpsv.KeepClean = false;
|
||||
|
||||
// Setting document root path
|
||||
// Setting the document root path
|
||||
_httpsv.RootPath = ConfigurationManager.AppSettings ["RootPath"];
|
||||
|
||||
// Setting HTTP method events
|
||||
|
Loading…
Reference in New Issue
Block a user