⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connld.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
.\".\" Copyright (C) 2000  John A. Boyd Jr.  protologos, LLC.\".\" This library is free software; you can redistribute it and/or.\" modify it under the terms of the GNU Library General Public.\" License as published by the Free Software Foundation; either.\" version 2 of the License, or (at your option) any later version..\".\" This library is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU.\" Library General Public License for more details..\".\" You should have received a copy of the GNU Library General Public.\" License along with this library; if not, write to the.\" Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,.\" MA 02139, USA..\".TH CONNLD 9 "24 Apr 2000" "LiS 2.9" "Linux STREAMS".SH NAME.B connld\- .B STREAMSmodule supporting the generation of unique new.BR STREAMS "\-based".I pipesfrom an existing pipe end..SH DESCRIPTIONThe.B connldmodule provides a means to generate multiple unique.BR STREAMS "\-based".I pipesfrom a single existing.I pipeend..sb.B connldmay only be.I pushed(via the.B "STREAMS I_PUSH".IR ioctl )onto a.BR STREAMS "\-based".IR pipe .When first.IR pushed ,.B connlddoes nothing; on each subsequent.BR open "(2), ".B connldwill generate a unique.BR STREAMS "\-based".IR pipe .One end of each new pipe replaces the original pipe end from theperspective of the.B opencall.The other end of each new pipe is sent, effectively as if bythe.B I_SENDFD.IR ioctl ,to the other end of the original pipe, ostensibly to be receivedby a subsequent.B I_RECVFD.I ioctloperation..SH "APPLICATION USAGE"The intent of.B connldis to provide a means to generate unique pipes which separatelyand independently connect client processes to a server process.The point of access for such clients is expected to be a pathname known to all such clients and to which a pipe end may beconnected (via.BR fattach "(3)) "by the server process.The server establishes the original pipe, pushes.B connldonto the client end, and then listens via.B I_RECVFDfor new connections on the server end.A client wishing to connect to the server will.BR open "(2) "the path name representing the client end, and can determine via.BR isastream "(3) "whether or not the server process is active and attached.  If it is, the.BR open "() "call returns one end of a unique new pipe that thus connectsthe client to the server..spSuch a server is responsible both for accepting new connectionsvia.B I_RECVFDon the original pipe, and for communicating with clients soconnected via the received pipe ends.It would also be reasonable for such a server process to invalidatethe point of access by calling.BR fdetach "(3) "before terminating..spIt should be noted that the.BR poll "(2) "primitive may be used to indicate when an .B M_PASSFPrepresenting a newly passed file is available on the original serverpipe end.This is reflected by the.B POLLINstatus setting in the.B eventsand.B reventsfields of a.B pollfdstructure.Moreover, any attempt to read an.B M_PASSFPmessage via the data-receiving primitives (i.e., .BR read "(2), " getmsg "(3), and " getpmsg "(3)) "will fail with.BR errno "(3) "returning an.B EBADMSGindication without discarding the message..spEven so, it should be reasonable to expect only.B M_PASSFPmessages will be received on the original server pipe end,since it is not possible to carry on normal data traffic whichhas.B connldon one end, since.B connlddoes not support such traffic..spThe use of.B connldcan be made entirely free-standing by attaching well-known paths to.I bothends of the original pipe.  The relevant capabilities are implementedin LiS so that the original creator of the.B pipecan close both ends after attaching paths to them, and theprocess of passing file descriptors can still be carried out vianew.BR open "()'s "as long as both ends remain attached..SH "SEE ALSO".BR fattach "(3), ".BR fattach "(8), ".BR fdetach "(3), ".BR fifo "(4), ".BR fifo "(9), ".BR pipe "(3), ".BR STREAMS "(4) ".SH HISTORYUnix System V Release 4 (SVR4).SH AUTHORJohn Boyd, protologos LLC.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -