Browse Source

Fix a few for Example2

pull/168/head
sta 12 years ago
parent
commit
b4eb9ead87
  1. 5
      Example2/Chat.cs
  2. 2
      Example2/Program.cs

5
Example2/Chat.cs

@ -19,12 +19,13 @@ namespace Example2
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 ()

2
Example2/Program.cs

@ -16,7 +16,7 @@ namespace Example2
//var wssv = new WebSocketServer ("ws://localhost:4649"); //var wssv = new WebSocketServer ("ws://localhost:4649");
//var wssv = new WebSocketServer ("wss://localhost:4649"); // For Secure Connection //var wssv = new WebSocketServer ("wss://localhost:4649"); // For Secure Connection
#if DEBUG #if DEBUG
// Changing logging level
// Changing the logging level
wssv.Log.Level = LogLevel.Trace; wssv.Log.Level = LogLevel.Trace;
#endif #endif
/* For Secure Connection /* For Secure Connection

Loading…
Cancel
Save