/// <summary> /// Destroy /// </summary> /// <param name="obj"></param> public void Destroy(UserObject obj) { try { obj.CloseSocket(); _users.Remove(obj); } catch (Exception ex) { if (ProcessError != null) { ProcessError(ex, "Destroy"); } } }
/// <summary> /// Connection Accept /// </summary> /// <param name="tmp_Socket"></param> private void _server_ConnectionAccept(AsyncSocket tmp_Socket) { try { var user = new UserObject(); _users.Add(user); user.SetSocket(tmp_Socket); } catch (Exception ex) { if (ProcessError != null) { ProcessError(ex, "_server_ConnectionAccept"); } } }