public static void Main (string[] args) { int port = DEFAULT_PORT; if (args.Length > 0) { port = int.Parse (args [0]); } var passwordMatcher = new OpenCLPasswordMatcher (); var listener = new CommandListener (port, Jobs); var queuer = new Queuer (Jobs, passwordMatcher, listener); listener.Queuer = queuer; var listenerThread = new Thread (listener.run); var queuerThread = new Thread (queuer.run); queuerThread.Start (); listenerThread.Start (); listenerThread.Join (); queuerThread.Join (); }
public Queuer (Dictionary<int, Job> jobs, IPasswordMatcher passwordMatcher, CommandListener listener) { this.Jobs = jobs; this.PasswordMatcher = passwordMatcher; this.Listener = listener; }