Giter VIP home page Giter VIP logo

yssource / linux-network-programming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from downdemo/linux-network-programming

0.0 0.0 0.0 26 KB

Sample codes for Linux network programming based on socket and I/O multiplexing in C++11, revealing the essence of computer network communication through packet capture.

Home Page: https://downdemo.github.io/Linux-Network-Programming/

License: MIT License

C++ 93.38% Makefile 6.62%

linux-network-programming's Introduction

Supported Platforms Build Status GitHub license

Documentation

Build and Run

  • build
git clone [email protected]:downdemo/Linux-Network-Programming.git
cd Linux-Network-Programming
make
  • Service would be generated in build directory
cd build
  • Run server before client
  • One running server at most because samples use the same port 12345
  • Ctrl + c to interrupt blocking server and client process

Run UDP sample

  • Run server
./udp_server
  • Run client in another shell
./udp_client

Run socket sample

  • Run server
./socket_server
  • Run client
./socket_client

Run fork sample

  • Run server
./fork_server
  • Run client multiple times
./fork_client
./fork_client
./fork_client
./fork_client
./fork_client

Run select samplepoll sampleepoll sample

  • Run any I/O multiplexing server, such as epoll_server
./epoll_server
  • Run multiple I/O multiplexing clients
./select_client
./select_client
./poll_client
./poll_client
./epoll_client
./epoll_client

RFC

linux-network-programming's People

Contributors

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