diff --git a/Example2/Chat.cs b/Example2/Chat.cs index 68387a7a..a6b367d9 100644 --- a/Example2/Chat.cs +++ b/Example2/Chat.cs @@ -32,9 +32,9 @@ namespace Example2 return Interlocked.Increment (ref _number); } - protected override void OnOpen () + protected override void OnClose (CloseEventArgs e) { - _name = getName (); + Sessions.Broadcast (String.Format ("{0} got logged off...", _name)); } protected override void OnMessage (MessageEventArgs e) @@ -42,9 +42,9 @@ namespace Example2 Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data)); } - protected override void OnClose (CloseEventArgs e) + protected override void OnOpen () { - Sessions.Broadcast (String.Format ("{0} got logged off...", _name)); + _name = getName (); } } } diff --git a/Example3/Chat.cs b/Example3/Chat.cs index 172f0f8d..b1a3f4d7 100644 --- a/Example3/Chat.cs +++ b/Example3/Chat.cs @@ -32,9 +32,9 @@ namespace Example3 return Interlocked.Increment (ref _number); } - protected override void OnOpen () + protected override void OnClose (CloseEventArgs e) { - _name = getName (); + Sessions.Broadcast (String.Format ("{0} got logged off...", _name)); } protected override void OnMessage (MessageEventArgs e) @@ -42,9 +42,9 @@ namespace Example3 Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data)); } - protected override void OnClose (CloseEventArgs e) + protected override void OnOpen () { - Sessions.Broadcast (String.Format ("{0} got logged off...", _name)); + _name = getName (); } } }