【网络编程】MarioTCP

来源:互联网 发布:淘宝用别人信用卡支付 编辑:程序博客网 时间:2024/06/02 05:36

0、参考博客

MarioTCP_一个可单机支持千万并发连接的TCP服务器- JohanFong - CSDN博客》

http://blog.csdn.net/everlastinging/article/details/10894493

 

1、下载

sourceforge下载:https://sourceforge.net/projects/mariotcp/files/latest/download

 

2、安装相应的库

Libevent

 

A)官网:http://libevent.org/

下载地址:

https://github-production-release-asset-2e65be.s3.amazonaws.com/1856976/f9ea6922-e66b-11e6-9f5c-722c00daa657?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170822%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170822T070439Z&X-Amz-Expires=300&X-Amz-Signature=0989ce6e1e89245c30f078c8d59a1bb2bc65ba32df743077520ae86b468fef4e&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlibevent-2.1.8-stable.tar.gz&response-content-type=application%2Foctet-stream

B)安装

.configure -prefix=/usr

make

make install

 

3、编译 MarioTCP

3.1 MarioTCP中执行make,将编译出maritcp(一个tcp服务器程序);

3.2 MarioTCP/mario中执行make,将编译出libmario.a(静态库);

3.3 MarioTCP/test中执行make,将编译出mario_test(一个简单的客户端测试程序)。


4、后续会更新MarioTCP的框架结构和使用方法

原创粉丝点击