static Process CreateProcess(string processName, int listeningPort, int remotePort) { ConsumerNetworkModule consumerNetworkModule = new ConsumerNetworkModule(listeningPort); ProducerNetworkModule producerNetworkModule = new ProducerNetworkModule(new IPEndPoint(IPAddress.Loopback, remotePort)); return(new Process(processName, consumerNetworkModule, producerNetworkModule)); }
public Consumer(ConsumerNetworkModule networkModule) { networkModule.MessageReceived += (object sender, DataMessage message) => { HandleMessage(message); }; }