private void SendHistory(PipeConnection connection) { foreach (var message in messageStorage.GetMessages()) { connection.SendMessage(message.ToString()); } ; }
private void RedirectClient() { string newConnectionName = GenerateConnectionName(); PipeConnection newConnection = new PipeConnection(newConnectionName); connections.Add(newConnection); StartConnectionForClient(newConnection); // Send to client it's new connection name mainConnection.SendMessage(newConnectionName); }