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

📄 wyfifofile.3wy

📁 一个不错
💻 3WY
📖 第 1 页 / 共 2 页
字号:
.PP.BI "virtual WyRet reset(const char* " "pathname " ",int " "f" ")" .PP.BI "virtual WyRet reset(const WyStr& " "pathname " ",int " "f" ")" .PP    Reconstruct *this to the state as WyFifoFile(\fIpathname\fP,\fIf\fP)      \fIf\fP= flags for ::open, except O_CREAT    Note: Opening a FIFO may block, see fifo(4).PP    [\fBRet\fP] Ok              Succeed. Error report from closing the                           previously associated device is ignored          Wym_EINVAL      \fIf\fP invalid          Wym_EBADF       File is not valid for the operation          Wym_EACCES      Search permission is denied          Wym_ENAMETOOLONG Pathname too long          Wym_ENOENT      Pathname does not exist          Wym_ENOTDIR     Entry in pathname is not a directory          Wym_EMFILE      Too many open fd          Wym_ENFILE      File table overflow          Wym_ENOMEM      Not enough memory          Wym_EEXIST      Pathname already exists          Wym_EINTR       Interrupted by a signal          Wym_ENOSPC      Device left no space for the operation          Wym_ENXIO       No such device (device not ready)          Wym_EROFS       Read-only file system          Wym_ENODEV      No such device          Wym_ELOOP       Too many symbolic links encountered          ...             reply converted from the errno of ::open    Note: Error report from closing the previously handled          object is ignored. Use reset() first if the close          return status is desired.PP     [\fBRefer\fP] ::open(const char*,int).\"--------------------------------------------.PP.BI "virtual WyRet _swap(WySysFile& " "ff" ") throw()".PP    Interchange state of *this with \fIff\fP.PP    [\fBRet\fP] Ok              Succeed          Wym_EBADTYPE    \fIff\fP is not the same type.\"--------------------------------------------.PP.BI "virtual WyFifoFile* _alloc(WyRet& " "r" ") const".PP    Allocate a default object of the most inherited type that    *this refers.    Note: Inhertied class must override this member          See man. wybyteflow(3wy) for the reimpement example.    \fIr\fP is reset with the return status:            Wym_ENOMEM      Not enough memory            Wym_ENOSYS      *Not overridden            ...             Same from constructing WyFifoFile().PP    [\fBRet\fP] Pointer of the allocated object, or NULL if failed.          User is responsible to \fBdelete\fP the returned object..\"--------------------------------------------.PP.BI "virtual WyRet read(void* " "buf" ", size_t " "count" ", size_t& " "n_read" ")".PP    Read at most \fIcount\fP bytes of data into memory pointed by \fIbuf\fP.    \fIn_read\fP is always written with the bytes read and stored    into \fIbuf\fP..PP    [\fBRet\fP] Ok              Succeed. Zero byte read means End-Of-file.          Wym_EBADF       Object is not valid for the operation          Wym_EFBIG       \fIcount\fP exceeds the maximum          Wym_EINTR       Interrupted by a signal before any data read          Wym_EAGAIN      Non-blocking I/O (no data read)          Wym_EIO         Low level I/O error          Wym_EINVAL      Device is not suitable for reading          Wym_EFAULT      \fIbuf\fP is inaccessible          Wym_ENOMEM      Not enough memory for \fIcount\fP.PP     [\fBRefer\fP] ::read(int,void*,size_t).\"--------------------------------------------.PP.BI "virtual WyRet read(WyStr&" " buf" ", size_t " "count" ", size_t& " "n_read" ")".PP    Read at most \fIcount\fP bytes of data and \fBappend\fP to \fIbuf\fP.    \fIn_read\fP is always written with the bytes read and appended    to \fIbuf\fP..PP    [\fBRet\fP] Ok              Succeed. Zero byte read means End-Of-file.          Wym_EBADF       Object is not valid for the operation          Wym_EFBIG       \fIcount\fP exceeds the maximum          Wym_EINTR       Interrupted by a signal before any data read          Wym_EAGAIN      Non-blocking I/O (no data read)          Wym_EIO         Low level I/O error          Wym_EINVAL      Device is not suitable for reading          Wym_ENOMEM      Not enough memory for \fIcount\fP.PP     [\fBRefer\fP] ::read(int,void*,size_t).\"--------------------------------------------.PP.BI "virtual WyRet write(const void* " "buf" ", size_t " "count" ", size_t& " "n_written" ")".PP    Write \fIcount\fP bytes of data in \fIbuf\fP to the system file.    The number of written bytes is always stored into \fIn_written\fP.PP    Note: The writting of data is atomic if \fIcount\fP<=PIPE_BUF.          If writting to a FIFO not opened for read on the other          end, the process is send a SIGPIPE signal, see fifo(4).    Note: The system buffer limits the bytes written.           Refer to system documents..PP    [\fBRet\fP] Ok              Succeed          Wym_EBADF       Object is not valid for the operation          Wym_EFBIG       Attempt to write beyond the device limit           Wym_EINVAL      Object attatched device is not suitable          Wym_EFAULT      \fIbuf\fP is inaccessible          Wym_EPIPE       Write to a pipe or FIFO with no reader          Wym_EAGAIN      Non-blocking I/O (write would block)          Wym_EINTR       Interrupted by a signal before data written          Wym_ENOSPC      Device left no space for the operation          Wym_EIO         Low level I/O error.PP     [\fBRefer\fP] ::write(int,const void*,size_t).\"--------------------------------------------.PP.BI "virtual WyRet write(WyCSeg " "buf" ", size_t& " "n_written" ")".PP    Write data indicated by \fIbuf\fP to the system file    The number of written bytes is always stored into \fIn_written\fP.PP    Note: The writting of data is atomic if \fIbuf\fP.size()<=PIPE_BUF.          If writting to a FIFO not opened for read on the other          end, the process is send a SIGPIPE signal, see fifo(4)..PP    [\fBRet\fP] Ok              Succeed          Wym_EBADF       Object is not valid for the operation          Wym_EINVAL      Object attatched device is not suitable          Wym_EFBIG       Attempt to write beyond the device limit           Wym_EPIPE       Write to a pipe or FIFO with no reader          Wym_EAGAIN      Non-blocking I/O (write would block)          Wym_EINTR       Interrupted by a signal before data written          Wym_ENOSPC      Device left no space for the operation          Wym_EIO         Low level I/O error.PP     [\fBRefer\fP] ::write(int,const void*,size_t).\"--------------------------------------------.PP.BI "virtual WyRet write(const WyStr& " "buf" ", size_t& " "n_written" ")".PP    Write data in \fIbuf\fP to the device.    The number of written bytes is always stored into \fIn_written\fP.PP    Note: The writting of data is atomic if \fIbuf\fP.size()<=PIPE_BUF.          If writting to a FIFO not opened for read on the other          end, the process is send a SIGPIPE signal, see fifo(4).    Note: The system buffer limits the bytes written.           Refer to system documents..PP    [\fBRet\fP] Ok              Succeed          Wym_EBADF       Object is not valid for the operation          Wym_EINVAL      Object attatched device is not suitable          Wym_EFBIG       Attempt to write beyond the device limit           Wym_EPIPE       Write to a pipe or FIFO with no reader          Wym_EAGAIN      Non-blocking I/O (write would block)          Wym_EINTR       Interrupted by a signal before data written          Wym_ENOSPC      Device left no space for the operation          Wym_EIO         Low level I/O error.PP     [\fBRefer\fP] ::write(int,const void*,size_t).\"--------------------------------------------.PP.BI "static WyRet mkpipe(WyFifoFile& " "rd" ", WyFifoFile& " "wr" ")".PP    Create a pipe, and reset \fIrd\fP for the read end, \fIwr\fP for the    write end of the pipe..PP    [\fBRet\fP] Ok              Succeed.          Wym_EINVAL      \fIrd\fP, \fIwr\fP refer to the same object          Wym_EMFILE      Too many open file descriptors          Wym_ENFILE      File table is full          ...             reply converted from the errno of ::pipe.PP     [\fBRefer\fP] ::pipe(int fd[2]).\"--------------------------------------------.PP.BI "static WyRet create(const char* " "pathname" ", mode_t " "m" ")".PP.BI "static WyRet create(const WyStr& " "pathname" ", mode_t " "m" ")".PP    Create a system FIFO file \fIpathname\fP with mode \fIm\fP.PP    [\fBRet\fP] Ok              Succeed.          Wym_EACCES      Search permission is denied          Wym_EEXIST      Pathname already exists          Wym_ENAMETOOLONG Pathname too long          Wym_ENOENT      A component in pathname does not exist          Wym_ENOTDIR     A component in pathname is not a directory          Wym_EROFS       Read-only file system          Wym_ENOSPC      Device left no space for the operation          Wym_ENOMEM      Not enough memory          ...             reply converted from the errno of ::mkfifo.PP     [\fBRefer\fP] ::mkfifo(const char*,mode_t).\"--------------------------------------------.SH "SEE ALSO".BR wyret.BR wyfilehandle.BR wyfilestat.BR wysockfile.BR wyregfile.BR wymutex.BR wystr.SH NOTEExcept added by this library, replys are converted from the errno an underlying C library function returned. Report of such replysare brief from Linux Programmer's Manual. See the associated man pagefor details.Project is in development, http://sourceforge.net/projects/libwx

⌨️ 快捷键说明

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