Beispiel #1
0
        public void Setup()
        {
            //EneterTrace.DetailLevel = EneterTrace.EDetailLevel.Debug;
            //EneterTrace.TraceLog = new StreamWriter("d:/tracefile.txt");
            //EneterTrace.StartProfiler();


            // Generate random number for the port.
            string aPort = RandomPortGenerator.Generate();

            TcpMessagingSystemFactory anUnderlyingMessaging = new TcpMessagingSystemFactory();

            //ChannelId = "tcp://127.0.0.1:" + aPort + "/";
            ChannelId = "tcp://[::1]:" + aPort + "/";

            MessagingSystemFactory = new AuthenticatedMessagingFactory(anUnderlyingMessaging,
                                                                       GetLoginMessage,
                                                                       GetHandshakeResponseMessage,
                                                                       GetHandshakeMessage, VerifyHandshakeResponseMessage, HandleAuthenticationCancelled)
            {
                AuthenticationTimeout = TimeSpan.FromMilliseconds(2000)
            };

            myHandshakeSerializer = new AesSerializer("Password123");
        }
        public void Setup()
        {
            string aPort     = RandomPortGenerator.Generate();
            string anAddress = "tcp://127.0.0.1:" + aPort + "/";

            IMessagingSystemFactory aMessaging = new TcpMessagingSystemFactory();

            InputChannel  = aMessaging.CreateDuplexInputChannel(anAddress);
            OutputChannel = aMessaging.CreateDuplexOutputChannel(anAddress);

            DuplexTypedMessagesFactory = new DuplexTypedMessagesFactory();
        }
Beispiel #3
0
        public void Setup()
        {
            //EneterTrace.DetailLevel = EneterTrace.EDetailLevel.Debug;
            //EneterTrace.TraceLog = new StreamWriter("d:/tracefile.txt");
            //EneterTrace.StartProfiler();

            // Generate random number for the port.
            string aPort = RandomPortGenerator.Generate();

            MessagingSystemFactory = new TcpMessagingSystemFactory();
            //ChannelId = "tcp://127.0.0.1:" + aPort + "/";
            ChannelId = "tcp://[::1]:" + aPort + "/";
        }
        public void Setup()
        {
            //EneterTrace.DetailLevel = EneterTrace.EDetailLevel.Debug;
            //EneterTrace.TraceLog = new StreamWriter("d:/tracefile.txt");
            //EneterTrace.StartProfiler();

            // Generate random number for the port.
            string aPort = RandomPortGenerator.Generate();

            MessagingSystemFactory = new WebSocketMessagingSystemFactory(new EasyProtocolFormatter());
            ChannelId = "ws://127.0.0.1:" + aPort + "/";

            this.CompareResponseReceiverId = false;
            this.myRequestMessage          = new byte[] { (byte)'M', (byte)'E', (byte)'S', (byte)'S', (byte)'A', (byte)'G', (byte)'E' };
            this.myResponseMessage         = new byte[] { (byte)'R', (byte)'E', (byte)'S', (byte)'P', (byte)'O', (byte)'N', (byte)'S', (byte)'E' };
            this.myMessage_10MB            = RandomDataGenerator.GetBytes(10000000);
        }