/// <summary> /// Main method for instantiating the factories and starting the server /// </summary> static async Task Main(string[] args) { RepositoriesFactory repoFactory = new RepositoriesFactory(); SocketControllerFactory socketFactory = new SocketControllerFactory(repoFactory); ServerSocket serverSocket = new ServerSocket(socketFactory); //await SeedDb(); serverSocket.Start(); }
/// <summary> /// One-argument constructor which initializes the sockets controllers factory, with instances responsible for handling client requests /// </summary> /// <param name="socketFactory">the sockets controller factory</param> public ServerSocket(SocketControllerFactory socketFactory) { this.socketFactory = socketFactory; }