public override void Run() { if (ConnectArguments.IsServer()) { StartServer(); } else { StartClients(); } }
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(); }
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(); } }
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(); } }