コード例 #1
0
 private void StartNamedPipeServer()
 {
     server = new InternalServer(pipeName, NamedPipeServerStream.MaxAllowedServerInstances);
     server.ClientConnectedEvent    += ClientConnectedHandler;
     server.ClientDisconnectedEvent += ClientDisconnectedHandler;
     server.MessageReceivedEvent    += MessageReceivedHandler;
     server.Start();
 }
コード例 #2
0
        private void UnregisterFromServerEvents(InternalServer server)
        {
            Console.WriteLine(">>> EMVConfigPS: UnregisterFromServerEvents");

            server.ClientConnectedEvent    -= ClientConnectedHandler;
            server.ClientDisconnectedEvent -= ClientDisconnectedHandler;
            server.MessageReceivedEvent    -= MessageReceivedHandler;

            Console.WriteLine("<<< EMVConfigPS: UnregisterFromServerEvents");
        }