Fix a few for Example3
This commit is contained in:
parent
b4eb9ead87
commit
0cb2335b48
@ -19,12 +19,13 @@ namespace Example3
|
|||||||
|
|
||||||
public Chat (string prefix)
|
public Chat (string prefix)
|
||||||
{
|
{
|
||||||
_prefix = prefix ?? "anon#";
|
_prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
|
||||||
}
|
}
|
||||||
|
|
||||||
private string getName ()
|
private string getName ()
|
||||||
{
|
{
|
||||||
return Context.QueryString ["name"] ?? (_prefix + getNum ());
|
var name = Context.QueryString ["name"];
|
||||||
|
return !name.IsNullOrEmpty () ? name : (_prefix + getNum ());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getNum ()
|
private static int getNum ()
|
||||||
|
@ -16,7 +16,7 @@ namespace Example3
|
|||||||
_httpsv = new HttpServer (4649);
|
_httpsv = new HttpServer (4649);
|
||||||
//_httpsv = new HttpServer (4649, true); // For Secure Connection
|
//_httpsv = new HttpServer (4649, true); // For Secure Connection
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
// Changing logging level
|
// Changing the logging level
|
||||||
_httpsv.Log.Level = LogLevel.Trace;
|
_httpsv.Log.Level = LogLevel.Trace;
|
||||||
#endif
|
#endif
|
||||||
/* For Secure Connection
|
/* For Secure Connection
|
||||||
@ -39,7 +39,7 @@ namespace Example3
|
|||||||
// Not to remove inactive clients in WebSocket services periodically
|
// Not to remove inactive clients in WebSocket services periodically
|
||||||
//_httpsv.KeepClean = false;
|
//_httpsv.KeepClean = false;
|
||||||
|
|
||||||
// Setting document root path
|
// Setting the document root path
|
||||||
_httpsv.RootPath = ConfigurationManager.AppSettings ["RootPath"];
|
_httpsv.RootPath = ConfigurationManager.AppSettings ["RootPath"];
|
||||||
|
|
||||||
// Setting HTTP method events
|
// Setting HTTP method events
|
||||||
|
Loading…
Reference in New Issue
Block a user