示例#1
0
        public void Run()
        {
            this.pongs  = 0;
            this.state  = 0;
            this.server = new EchoServer(HandleType.Tcp);

            this.loop = this.server.Loop;
            this.StartClient();
        }
示例#2
0
文件: Pound.cs 项目: wazazhang/NetUV
        public void Run()
        {
            this.closedStreams     = 0;
            this.connectionsFailed = 0;

            this.server = new EchoServer(this.handleType);
            this.loop   = this.server.Loop;

            this.loop.UpdateTime();
            this.start = this.loop.Now;

            this.startTime = this.loop.NowInHighResolution;
            this.StartClients();
            this.activeStreams = this.clientCount;

            this.loop.RunDefault();

            double duration = (this.stopTime - this.startTime) / (double)NanoSeconds;
            double value    = this.closedStreams / duration;

            Console.WriteLine($"{this.handleType} conn pound : {this.clientCount} {TestHelper.Format(value)} accepts/s ({TestHelper.Format(this.connectionsFailed)} failed)");
        }
示例#3
0
 public void Dispose()
 {
     this.server = null;
     this.loop   = null;
 }
示例#4
0
 public void Dispose()
 {
     this.dataBuffer.Dispose();
     this.server = null;
     this.loop   = null;
 }