private void MessagingConnectionHandler_OnStarted(object sender, StartMessagingConnectionEventArgs e) { var unsubscriber = e.MessageConnection.Subscribe <MyIPData>(next: async value => { await roomConnection.TellMyIpAsync(e.UserId, value.IP.Address, value.IP.Port); }); unsubscribers.Add(e.UserId, unsubscriber); }
private void MessagingConnectionHandler_OnStarted(object sender, StartMessagingConnectionEventArgs e) { sendingAddresses.Add(e.UserId, null); receiveMessageUnsubscribers.Add(e.UserId, e.MessageConnection.Subscribe <MessageData>(next: data => { MessageDataHandle(e.UserId, data); })); messageConnections.Add(e.UserId, e.MessageConnection); }