/// <summary> /// When a new message is received, the participant is added to the list of Participants. /// </summary> private async void MessageToConnectReceivedFromParticipantAsync( StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args) { var participant = new DnssdParticipantInformation { Host = args.Socket.Information.RemoteAddress }; // Read the subscriber's message. using (var reader = new StreamReader(args.Socket.InputStream.AsStreamForRead())) { string message = await reader.ReadLineAsync(); if (message != TEST_MESSAGE) { // Add the participant. base.AddParticipant(participant, message); } } }