spserver http性能测试结果

spserver 为了搭一个spserver服务器,花了半天的时间,终于搞好了.....其实也怪我自己,因为粗心大意没看清楚编译spserver源代码工程的先后顺序,一直搞不定,果断google百度了半下午+一晚上,不过收获还是很大的。 现在把我这半天中碰到的有关spserver的问题及学到的东 阅读详情
 
D:NoInstallApache2.2.4SSLin>ab -n 10000 -c 300 http://172.20.32.104:8080/
This is ApacheBench, Version 2.0.40-dev 
<$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.20.32.104 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        sphttp/spserver
Server Hostname:        172.20.32.104
Server Port:            8080

Document Path:          /
Document Length:        258 bytes

Concurrency Level:      300
Time taken for tests:   36.671875 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      4050000 bytes
HTML transferred:       2580000 bytes
Requests per second:    272.69 [#/sec] (mean)
Time per request:       1100.156 [ms] (mean)
Time per request:       3.667 [ms] (mean, across all concurrent requests)
Transfer rate:          107.85 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3  31.1      0    3046
Processing:     0 1082 539.6   1000    4140
Waiting:        0  603 594.1    531    4062
Total:         15 1085 540.4   1000    4140

Percentage of the requests served within a certain time (ms)
  50%   1000
  66%   1015
  75%   1015
  80%   1031
  90%   1062
  95%   1234
  98%   4078
  99%   4109
 100%   4140 (longest request)

D:/NoInstall/Apache2.2.4SSL/bin>ab -n 10000 -c 1000 http://172.20.32.104:8080/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 172.20.32.104 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests


Server Software:        sphttp/spserver
Server Hostname:        172.20.32.104
Server Port:            8080

Document Path:          /
Document Length:        258 bytes

Concurrency Level:      1000
Time taken for tests:   40.828125 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      4050000 bytes
HTML transferred:       2580000 bytes
Requests per second:    244.93 [#/sec] (mean)
Time per request:       4082.813 [ms] (mean)
Time per request:       4.083 [ms] (mean, across all concurrent requests)
Transfer rate:          96.87 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3  31.1      0    3046
Processing:    46 3904 1107.0   3843    6734
Waiting:        0 1908 1116.5   1906    6718
Total:         46 3907 1107.3   3843    6734

Percentage of the requests served within a certain time (ms)
  50%   3843
  66%   3953
  75%   4062
  80%   4093
  90%   6312
  95%   6437
  98%   6593
  99%   6671
 100%   6734 (longest request)
spserver:SPServer是一个用C++编写的高并发服务器框架库 SPServer 是一个用 C++ 编写的服务器框架库,它实现了半同步/半异步和领导者/跟随者模式。 它基于 libevent,以便在任何平台上利用最佳 I/O 循环。 SPServer 可以简化 TCP 服务器的构建。 它是线程和事件驱动之间的混合系统,并利用了两种编程模型的优点。 它向程序员公开了一种线程化的编程风格,同时使用事件驱动的风格来处理网络连接。 SPServer 还包括一个嵌入式 http 服务器框架——sphttp。 sphttp 可以简化将 Web 服务器功能添加到任何 C++ 应用程序的过程。 它对于将基于 Web 的管理或统计添加到任何 C++ 程序或成为 XML-RPC 或 JSON-RPC 的服务器框架非常有用。 SPServer 可通过 FreeBSD Ports Collection 获得。 变更日志: 0.9.5 版 (12.13.2009) 的变 立即下载

相关推荐

SpServer-0.9.4 一个高性能服务器代码

SpServer 高性能 服务器 代码,相当好用

php 10000并发服务器,MixPHP 与原生 PHP 并发压力测试

PHP 性能最好的应该就是原生代码了吧,真的么?MixPHP 是基于 Swoole 扩展的高性能 PHP 框架,今天我来做个对比测试,一行代码 VS 六千多行代码。环境虚拟机: 4 核,1G使用 ab 工具压测,命令:ab -n 10000 -c 300 URL原生 PHPApache worker模式,mpm配置如下:ServerLimit 50ThreadLimit 200StartSer...

weixin_35306450的博客 611

spserver0.9.5最新代码

The SPServer library and included programs are provided under the terms of the GNU Lesser General Public License (LGPL) with the following exceptions: 1. Modifications to the SPServer configure script, config header file, and makefiles by themselves to support a specific platform do not constitute a modified or derivative work. The authors do request that such modificationsbe contributed to the SPServer project - send all contributions to "spserver@googlegroups.com". 2. Static linking of applications to the SPServer library does not constitute a derivative work and does not require the author to provide source code for the application, use the shared SPServer libraries, or link their applications against a user-supplied version of SPServer. If you link the application to a modified version of SPServer, then the changes to SPServer must be provided under the terms of the LGPL in sections 1, 2, and 4. 3. You do not have to provide a copy of the SPServer license with programs that are linked to the SPServer library, nor do you have to identify the SPServer license in your program or documentation as required by section 6 of the LGPL. However, programs must still identify their use of SPServer. The following example statement can be included in user documentation to satisfy this requirement: [program] is based in part on the work of the SPServer project (http://code.google.com/p/spserver/)

从spserver看HS-HA模式

序在互联网企业里,*nux下的C/C++编程主要的焦点还是server开发,关于不同的server模型,在UNP第30章里有过简单的讨论,这里得出的结论就是多线程和多进程的server模型效率较高。但书中缺乏对多路复用机制的讨论,而当前主流的server模型则是epoll+multi-threads/multi-processes,lighttpd就属于这种模型。本文将探讨一个更加高效的ser

vinowan的专栏 885

小案例:利用图床自动化批量上传图片并获取图片链接

用python爬虫写了一个小脚本,用来自动上传图片到图床,然后返回链接,我们只需直接复制链接就可以。(需要安装Requests库) 因为不同图床需要提交的POST表单不一致,所以在这里我用ImgURL图床做示范,如果大家有需求,可自行修改代码。使用脚本的时候,我们只需把需要上传的图片和这个脚本放在同一个文件夹中,然后运行脚本,稍作等待,看到提示时就可以在脚本运行文件夹中发现一个名为“图片链接地址.txt”的文件,里面就是图片链接啦! 四、图片链接地址.txt(单张图片):...

采菊东篱下,Python满乾坤! 4409

国产NAS哪家强?极空间&绿联&威联通&群晖对比

随着个人数据量暴增,传统网盘空间不足和下载速度慢问题愈发凸显。新势力NAS,作为数据管理领域的璀璨新星,正以其独特的互联网设计理念,引领家庭及小型办公用户向数据存储的新纪元。它不仅仅是一款产品,更是为初学者用户量身定制的贴心伙伴。其系统界面之简洁、操作流程之直观,让人一目了然,真正实现了“即插即用”的极致便捷。同时,新势力NAS在保持专业水准的同时,更提供了多样化的扩展性配置,轻松应对各种数据存储与管理需求,让家庭及小型办公场景下的数据管理变得前所未有的简单与高效。

专注大数据、云计算、人工智能、机器人领域技术传播 3643

spring-prometheus的指标含义

前言 spring-boot作为一个长时间运行的服务,需要也应该能采集到一些指标来反映系统自身的运行状态。下面就spring-boot输出的一些指标分类说明。 依赖 spring-boot开启指标采集需要加入prometheus依赖。 指标处理 name type data http_server_requests_seconds summary http_server_requests_seconds_count{exception=“None”,method=“GET”,outcome=

ssehs的博客 1万+

手把手教学:利用AutoDL与vLLM快速部署DeepSeek-R1大模型实战指南

本文详细介绍了如何利用AutoDL平台和vLLM框架快速部署DeepSeek-R1大模型的实战指南。从服务器配置、vLLM安装优化到模型部署的两种方案,再到性能调优和生产环境建议,手把手教你高效完成大模型部署。特别针对国内开发者遇到的网络问题提供了稳定解决方案,并分享了显存优化、磁盘清理等实用技巧。

weixin_42531779的博客 327

SPServer : 一个基于 半同步/半异步 模式的高并发 server 框架

最先发布在:http://iunknown.javaeye.com/blog/59804SPServer : 一个基于 半同步/半异步 模式的高并发 server 框架 关键字:   libevent Half-Sync/Half-Async 并发服务器 半同步半异步spserver 是一个实现了 半同步/半异步 模式的 server 框架,

ken16的专栏 2789

TDISP(TEE Device Interface Security Protocol)软件操作流程

/ 1. SPDM会话相关定义(🔶1-37、🔶1-187)// SPDM会话ID// AES-256-GCM加密密钥(TDISP要求)// 初始向量// 会话是否激活// 2. IDE流配置(🔶1-52、🔶1-625)// IDE流ID// 4个子流的AES密钥(覆盖所有子流类型)// 密钥是否已配置// 3. TDI状态与配置(🔶1-207、🔶1-210)TDI_CONFIG_UNLOCKED = 0, // 初始配置态。

inquisiter 1430

机器视觉最全面试题总结

空洞卷积(Atrous Convolution)也叫做膨胀卷积、扩张卷积,最初的提出是为了解决图像分割在用下采样(池化、卷积)增加感受野时带来的特征图缩小,后再上采样回去时造成的精度上的损失。空洞卷积通过引入了一个扩张率的超参数,该参数定义了卷积核处理数据时各值的间距。可以在增加感受野的同时保持特征图的尺寸不变,从而代替下采样和上采样a. 是普通的卷积过程(dilation rate = 1),卷积后的感受野为3b. 是dilation rate = 2的空洞卷积,卷积后的感受野为5。

@bangbang的博客 9206

SPServer 简介

SPServer 是一个实现了半同步/半异步(Half-Sync/Half-Async)和领导者/追随者(Leader/Follower) 模式的服务器框架,能够简化 TCP server 的开发工作。<br /><br />SPServer 使用 c++ 实现,目前实现了以下功能:<br />1.封装了 TCP server 中接受连接的功能;<br />2.使用非阻塞型I/O和事件驱动模型,基于 libevent;<br />3.对于 HSHA 线程池,由主线程负责处理所有 TCP 连接上的数据读取和发

peckjerry的专栏 1292

CAD二次开发c# .net加载cui\cuix菜单文件

public static void LoadMyCui(string cuiFile) { Document doc = Application.DocumentManager.MdiActiveDocument; object oldCmdEcho = Application.GetSystemVariable("CMDECHO"); object oldFileDia = Application.GetSys..

2127

spserver剖析之HS/HA模式

《POSA2》上对所谓的half-sync/half-asyn模式的描述如下: 半同步/半异步体系结构模式将并发系统中的异步和同步服务处理分离,简化了编程,同时又没有降低性能(通常网络模型中异步模型性能明显高于同步模型,但编程难度要复杂得多并且难于调试)。该模式引入了两个通信层,一个用于异步服务处理,另一个用于同步服务处理。     这个模式最早是由著名的ACE的作者的一篇文章文章提出,其主要思想就是用异步的方式来处理IO操作,而用同步的方式来处理业务逻辑,同步和异步之间使用一个队列作为缓冲。需要同步处理的

二进制的意境 1957

当SLAM遇上FPGA:打造一个会“硬件加速”的激光雷达SLAM系统

点云数据的运动畸变校正特征点提取与匹配、以及ICP迭代最近点配准。在传统方案中,我们通常用ARM核完成所有计算。但点云配准中的最近邻搜索(KD-Tree)需要大量分支判断,CPU处理起来效率很低;而ICP中的矩阵分解(SVD)虽然计算量大,但非常适合并行化。ZYNQ的特殊之处在于它把ARM(PS端)和FPGA(PL端)集成在同一颗芯片上。ARM擅长跑操作系统、处理复杂逻辑和调度,FPGA擅长做高吞吐量的并行计算。两者之间通过AXI总线高速互联,数据交换延迟只有几十个时钟周期。

QQ_778132974的博客 374

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

spserver 架构分析(一)

<br />一直对多线程和网络编程比较感兴趣,自学了一些winsock和TCP/IP的知识,一年前因为项目需要,接触了一段时间的ACE,使用了其中的 Reactor框架,那时对网络编程还不甚熟悉,感觉ACE挺神秘。其间也就是根据项目需要使用了一下其中的某个框架,对于ACE内部的实现原理,也没怎 么多想。 <br />        随着在网络以及多线程方面知识的积累,近日忽然想要学习一下ACE库的源代码,借鉴一下它的实现手法。到ACE的官网上下载了 ACE的源代码,准备开始看时,却如堕五里雾中了,不

markman101---神即是道 道法自然 如来 1788

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

SPWebServer:一个基于 SPServer 的 web 服务器框架

看到这个题目,估计很多人会问:为什么要再实现一个 web 服务器? 这里有几个原因: 1.这是一个 web 服务器框架,不是一个完整的 web 服务器。也就是说 SPWebServer 提供的是一套 API 和类库,可以方便地集成到现有的应用程序中。可以称 SPWebServer 为 [url=http://wiki.huihoo.com/index.php?title=Embedde...

iunknown 363

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

基于SPserver的大型通信服务器开发

服务方向 软件开发技术服务软件开发办公财务MIS股票设备监控网页信息采集及控制多媒体软件开发培训Java 安卓移动开发Java Web开发网站前端开发VC++C++游戏开发培训C#软件C语言(Linux)ASP.NET网站开发(C#)C#软件+ASP.NET网站SOCKET网络通信开发COMOLE和ActiveX开发C++(Linux)汇编和破解驱动开发SkinMagicVC++换肤LinuxC

zgx123666的专栏 3067

性能测试:一种计算 TP90、TP95 和 TP99 等水位线的方法

文章目录前言 前言 在性能测试中,我们经常会选择 TP90、TP95 或者 TP99 等水位线作为性能指标。在本文中,我们就给出一种计算 TP90、TP95 和 TP95 等水位线的方法。首先,我们先解释一下 TP90、TP95 和 TP95 的含义: TP90,top percent 90,即 90% 的数据都满足某一条件; TP95,top percent 95,即 95% 的数据都满足某一...

安正勋的博客 2万+

socket

原来的网址: 对socket服务器海量并发比较感兴趣,从网上搜了一些材料,和大家分享一下: 一、SPServer: 一个基于线程池(包括HAHS和LF)的开源服务器框架 SPServer 是一个实现了半同步/半异步(Half-Sync/Half-Async)和领导者/追随者(Leader/Follower) 模式的服务器框架,能够简化 TCP server 的开发工作。

529

spserver线程池代码阅读

spserver实现了领导者/追随者模型,依赖线程池实现其机制,优点是不用缓存数据包,领导者线程获得数据后直接调用处理函数处理,并且其他追随者线程醒来成为领导者线程去等待下一个数据包 代码: 1.构造函数 SP_ThreadPool :: SP_ThreadPool( int maxThreads, const char * tag ) { if( maxThreads <= 0 ) maxThreads = 2; sp_thread_mutex_init( &mMain...

zxbcollegestudent的专栏 360

SPServer : 一个基于线程池(包括HAHS和LF)的高并发 server 框架

[b]spserver 是一个实现了半同步/半异步(Half-Sync/Half-Async)和领导者/追随者(Leader/Follower) 模式的服务器框架,能够简化 TCP server 的开发工作。 spserver 使用 c++ 实现,目前实现了以下功能: 1.封装了 TCP server 中接受连接的功能; 2.使用非阻塞型I/O和事件驱动模型,由主线程负责处理所有 TCP 连...

iunknown 371

http请求request详解

HttpServletRequest对象代表客户端的请求,当客户端通过HTTP协议访问服务器时,HTTP请求头中的所有信息都封装在这个对象中,通过这个对象提供的方法,可以获得客户端请求的所有信息。 获得客户机信息   getRequestURL方法返回客户端发出请求时的完整URL。   getRequestURI方法返回请求行中的资源名部分。   getQueryString 方法返回请求行中的参数部分。   getPathInfo方法返回请求URL中的额外路径信息。额外路径信息是请求URL中的位于..

technologyleader的专栏 5638

使用SPHttpClient对象与SharePoint交互

在SharePoint Framework中,有一个对象SPHttpClient,这个对象继承了HttpClient对象,可以使用这个对象方便地调用SharePoint REST API。 在使用这个对象之前,需要导入这个对象: import { SPHttpClient, SPHttpClientResponse, SPHttpClientConfiguration } from '@mic...

shrenk的专栏 812
上一篇: Windows Vista 远程桌面连接参数
下一篇: OpenSSL windows 编译
FlySpace
博客等级 码龄27年 17粉丝 121原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值