Exemple #1
0
 public override void Run()
 {
     if (ConnectArguments.IsServer())
     {
         StartServer();
     }
     else
     {
         StartClients();
     }
 }
Exemple #2
0
        private IDisposable StartClients()
        {
            var binding = new NetTcpBinding() { Security = { Mode = SecurityMode.None } };

            var clientmanager = new DuplexChannelManager(
                ConnectArguments.ConnectionLimit,
                ConnectArguments.MessageRate,
                binding,
                ConnectArguments.CreateNetTcpAddress(),
                CreateMessage(binding));

            return clientmanager.Start();
        }
Exemple #3
0
        public override void Run()
        {
            CommandLine.CommandEnvironment = new CommandEnvironment(this.GetType().Name, ConnectArguments.ScenarioArguments);
            _socketArgs = CommandLine.Parse <SocketCommandArgs>();

            if (ConnectArguments.IsServer())
            {
                server = new SocketServer(ConnectArguments.Port, _socketArgs);
                server.StartServer();
            }
            else
            {
                clients = new SocketClientManager(ConnectArguments, _socketArgs);
                clients.Start();
            }
        }
Exemple #4
0
 public override void Run()
 {
     if (ConnectArguments.IsServer())
     {
         _server = new TcpChannelServer(ConnectArguments.CreateNetTcpAddress());
         _server.StartServer();
     }
     else
     {
         _clients = new DuplexChannelManager(ConnectArguments.ConnectionLimit,
                                             ConnectArguments.MessageRate,
                                             new NetTcpBinding()
         {
             Security = { Mode = SecurityMode.None }
         },
                                             ConnectArguments.CreateNetTcpAddress());
         _clients.Start();
     }
 }