[Modify] Polish it

This commit is contained in:
sta 2015-11-30 12:06:31 +09:00
parent 9c03d1e8e3
commit b6bf45c019
2 changed files with 8 additions and 8 deletions

View File

@ -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 ();
}
}
}

View File

@ -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 ();
}
}
}