//--------------------------------------------------------------------- #endregion // DirectPlay Object Initializations #region DirectPlay Event Handlers //--------------------------------------------------------------------- /// <summary> /// Event handler for the DirectPlay FindHostResponse message /// </summary> public void FindHostResponseHandler(object sender, FindHostResponseEventArgs args) { HostInfo Node = new HostInfo(); Node.GuidInstance = args.Message.ApplicationDescription.GuidInstance; Node.HostAddress = (Address)args.Message.AddressSender.Clone(); Node.SessionName = args.Message.ApplicationDescription.SessionName; // If he haven't already seen this host, add the detected session // to the stored list if (!FoundSessions.Contains(Node)) { FoundSessions.Add(Node); } }
public string SessionName; // Display name for the session /// <summary> /// Used by the system collection class /// </summary> public override bool Equals(object obj) { HostInfo node = (HostInfo)obj; return(GuidInstance.Equals(node.GuidInstance)); }