Git Product home page Git Product logo

socket's Introduction

Socket

Linux网络编程


tcp_socket

基与TCP协议的客户端服务器编程
  • 编写TCP服务器套接字程序,程序运行时服务器等待客户的连接.
  • 一旦连接成功,则显示客户的IP地址、端口号,并向客户端发送字符串.

tcp_process

基于自定义协议的多进程模型的服务器编程
  • 自定义msg编写 包含write和read函数,以及checkNum校验和机制
  • 多进程模型服务器编程 fork()进程处理多个客户端连接,使用SIGPIPE信号机制,处理客户端单方断开连接 errno==EEIPIE,回收子进程,避免僵尸进程
  • 多进程模型客户端编程 调用IO函数和服务器端双向通信

tcp_thread

基于多线程的服务器端编程
  • 服务器端 主控线程负责调用accept去获取客户端连接 启动子线程区进行IO双向通信

socket's People

Contributors

estormlynn avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.