Code Monkey home page Code Monkey logo

study's Introduction

教程

感谢

感谢Swoole这个项目,没有这个项目,就没有这个教程。

特别注意

请不要安装xdebug扩展。

本教程适合人群

基本的数据结构、网络编程、汇编语言、C语言,能读懂代码即可,并且希望成为一个优秀的PHP工程师的人。

讨论

可以加QQ群进行讨论:

942858122

如果对教程有什么疑问,欢迎在issue提出(建议先提issue,然后再在群里问),我们一起努力打造出一个高质量的、系统化的PHP扩展开发教程。

开发环境

PHP版本:7.3.5

操作系统:我希望你是alpine

你也可以直接使用我为你准备的Dockerfile,以保证和我的开发环境一致,避免不必要的麻烦:

docker build -t study -f docker/Dockerfile .

目录

第一阶段 协程基础模块

1、编写config.m4文件

2、开发规范

3、整理文件

4、理解PHP生命周期的过程

5、梳理一下架构

6、协程创建(一)

7、协程创建(二)

8、协程创建(三)

9、协程创建(四)

10、协程创建(五)

11、协程创建(六)

12、协程创建(七)

13、协程创建(八)

14、协程yield

15、协程resume

16、协程getCid

17、修复一些bug(一)

18、修复一些bug(二)

19、协程isExist

20、修复一些bug(三)

21、协程defer

22、协程短名(一)

23、协程短名(二)

第二阶段 网络模块

24、引入libuv

25、sleep(一)

26、sleep(二)

27、sleep(三)

28、sleep(四)

29、sleep(五)

30、server创建(一)

31、server创建(二)

32、server接收请求

33、server监听的封装

34、server接收数据

35、server发送数据

36、server错误码

37、压测server(一)

38、socket可读写时候调度协程的思路

39、全局变量STUDYG

40、定义协程化的Socket类

41、协程化Socket::Socket

42、实现coroutine::Socket::bind和listen

43、协程化Socket::accept

44、协程化Socket::wait_event

45、在事件到来时resume对应的协程

46、协程化Socket::recv和send

47、实现coroutine::Socket::close

48、协程化服务器(一)

49、协程化服务器(二)

50、协程化服务器(三)

51、协程化服务器(四)

第三阶段 优化(一)

52、修复一些bug(四)

53、修复一些bug(五)

54、修复一些bug(六)

55、server关闭连接

56、压测server(二)

57、修复一些bug(七)

58、错误使用协程库导致的Bug(一)

59、重构协程调度器模块

60、修复一些bug(八)

61、修复一些bug(九)

62、重构定时器(一)

62、重构定时器(二)

63、保存PHP栈

第四阶段 CSP并发模型

64、Channel实现原理

65、Channel创建

66、实现Channel基础类

67、Channel的push和pop

第四阶段 优化(二)

68、修复一些bug(十)

69、重构Channel(一)

70、重构Channel(二)

71、自定义Socket对象

72、修复一些bug(十一)

73、重构Server

study's People

Contributors

colorrabbit avatar huanghantao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.