コード例 #1
0
        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));
        }
コード例 #2
0
 public Consumer(ConsumerNetworkModule networkModule)
 {
     networkModule.MessageReceived += (object sender, DataMessage message) => { HandleMessage(message); };
 }