public static async Task Main() { Console.Title = "InterReact"; Console.SetWindowSize(100, 30); Console.SetBufferSize(100, 100); var serverLoggerFactory = new MyLoggerFactory("Server: ", ConsoleColor.DarkMagenta); var clientLoggerFactory = new MyLoggerFactory("Client: ", ConsoleColor.DarkYellow); var libraryLoggerFactory = new MyLoggerFactory("ClientLibrary: ", ConsoleColor.DarkCyan); var serverTask = new Client(Port, clientLoggerFactory.CreateLogger(), libraryLoggerFactory).Run(); var clientTask = new Server(Port, serverLoggerFactory.CreateLogger <RxSocketServer>()).Run(); await Task.WhenAll(clientTask, serverTask); await Task.Delay(1000); Console.ResetColor(); }
internal Client(int port, ILogger logger, MyLoggerFactory loggerFactory) { Port = port; Logger = logger; LoggerFactory = loggerFactory; }