public void stopKernel(Comunication comunicationSet) { comunicationSet.sendMessage("{cmd:stop,src:kernel,dst:GUI,msg:\"Stop System\"}", 8081); comunicationSet.sendMessage("{cmd:stop,src:kernel,dst:GestorArc,msg:\"Stop System\"}", 8082); comunicationSet.sendMessage("{cmd:stop,src:kernel,dst:APP,msg:\"Stop System\"}", 8083); System.Environment.Exit(1); }
static void Main(string[] args) { Kernel core = new Kernel(); core.initilizationCore(); Comunication comunicationSet = new Comunication(); Messages messages = new Messages(core, comunicationSet); comunicationSet.setterMessages(messages); Thread listener = new Thread(() => comunicationSet.StartListening(8080)); listener.Start(); }
public Messages(Kernel core, Comunication comunication) { this.comunication = comunication; this.core = core; }