Exserver a high-performance server software

What is Exserver?

Exserver is a socket interface based socket server software in pure C completed. Why Learn Exjson

Why Learn Exserver

Exserver properties

  • Exserver using Exjson configuration, Exjson JSON is also resolved by a comment I support the development of the engine, compared to other JSON parser is concerned, Exjson Comments are supported;
  • Exserver multi-process model, compared to the previous version of Xserver multi-threaded, the more stable
  • Exserver using event mechanism, and based on their platform epoll or kqueue multiplexing
  • Exserver code is simple and clear; easy to learn socket programming students study
  • Performance slightly lower than nginx , is stepping up efforts in this regard Optimization
  • BSD protocol, commercial
  • Very low memory footprint, each process 74kb

Simple example

/**
 * Copyright @2019 Exserver All Rights Reserved.
 */

#include <ex_http_server.h>

int main(int argc, char *argv[])
{
    /* 生成4个子进程 */
	ex_gen_worker(4, NULL);
	
	/* 主进程通过配置文件完成初始化以及监听 */
	ex_http_server_from_config();

    /* 静态网页服务器完成了 */
    return 0;
}

复制代码

Page supported MIME format

text/html HTML text files
text/css CSS style file
text/xml XML file
image/gif GIF file
image/jpeg JPG picture
application/javascript JavaScript script
application/json JSON file
text/plain TXT file
image/png PNG image files
video/mp4 MP4 file
audio/mpeg MP3 files
application/zip ZIP file
application/octet-stream This return does not recognize the file format by default

More MIME file types are speeding Support

Guess you like

Origin blog.csdn.net/weixin_34119545/article/details/91379980