Coder Social home page Coder Social logo

ihavec / linux-system-programming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srymaker0/linux-system-programming

0.0 0.0 0.0 5.48 MB

这里分享了一些关于Linux系统编程的知识与一些简单的功能实现,比如:ls的实现、IO多路复用、简易聊天室、reactor模型、粘包问题、文件传输等

C++ 20.62% C 79.38%

linux-system-programming's Introduction

linux-system-programming

这里记录了个人学习linux系统编程的代码和一些小的功能。common目录是一个通用目录,各部分代码需要用到的文件都在此目录中,以下是说明:point_down:

common目录下

head.h:包含系统编程头文件,自己实现的功能的一些头文件

thread_pool.h: 线程池

reactor.h add_to_subreactor : reactor反应堆

common.h: 一些通用功能,比如设置文件描述符为非阻塞、实现socket创建和连接

1.命令行参数

2.文件与目录

3.实现基于linux下的ls功能

  • 这是linux下自带的ls -al功能

  • 进入03.Ls目录下执行./a.out -al . ,你可以看到以下效果

4.进程间通信的方式

5.进程

6.线程

7.网络编程之进程

8.网络编程之线程

9.I/O多路复用之select

10.文件传输

11.粘包问题

  • C/S文件传输的实现

  • 个人博客中有更详细的说明

12.reactor反应堆

15.poll之简易聊天室

  • 客户端使用poll同时监听用户输入和网络连接
  • 服务端接收客户数据,并把客户数据发送给每一个登录到该服务器上的客户端

linux-system-programming's People

Contributors

srymaker0 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.