Implementation of one-way communication of pipelines named pipes

Source: Internet
Author: User


    • One-way pipeline communication implementation principle:

In computer programming, a named pipe is an information transfer from one process to another using kernel objects. Unlike a typical pipeline, named pipes can be called by different processes in different ways (across permissions, across languages, across platforms). As long as the program knows the name of the named pipe, the information sent to the named pipe can be read by all the programs that have the specified authorization, but not with the authorization. A named pipe is a FIFO (first in, First-in, first-out) object.

    • Code implementation


Client.c

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/84/79/wKioL1eRs0OTvxqSAADCVncKV48656.png-wh_500x0-wm_3 -wmp_4-s_2002250281.png "title=" Client.png "alt=" Wkiol1ers0otvxqsaadcvnckv48656.png-wh_50 "/>

Server.c

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/84/79/wKiom1eRs2KRoajdAADAJfJIdEE467.png-wh_500x0-wm_3 -wmp_4-s_461243511.png "title=" Server.png "alt=" Wkiom1ers2kroajdaadajfjidee467.png-wh_50 "/>

Makefile File:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/84/79/wKioL1eRthyAsFW9AABjRjoi-9s786.png-wh_500x0-wm_3 -wmp_4-s_3979111209.png "title=" Makefile.png "alt=" Wkiol1erthyasfw9aabjrjoi-9s786.png-wh_50 "/>

Operating interface:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/84/79/wKioL1eRs3jBgbYRAAEm4gPp5Ow185.png-wh_500x0-wm_3 -wmp_4-s_2161796208.png "title=" Pipe.png "alt=" Wkiol1ers3jbgbyraaem4gpp5ow185.png-wh_50 "/>

This article from the "Learning Record" blog, reproduced please contact the author!

Implementation of one-way communication of pipelines named pipes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.