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

📄 wy_sockaddr.3wy

📁 一个不错
💻 3WY
字号:
.\".\" Edited by I.J.Wang, 2004.\".TH Wy_SockAddr 3wy "libwy v0.31".SH NAMEWy_SockAddr \- base class of socket address.SH SYNOPSIS.B #include <wy_sockaddr.h>.PPWy_SockAddr is a protocol class for socket addressThis class is for socket address implementation .SH "PUBLIC MEMBERS" virtual \fB~Wy_SockAddr\fP() int \fBfamily\fP(void) const throw() virtual WyRet \fBnotation\fP(WyStr&) const=0.SH "PROTECTED MEMBERS" virtual void \fBreset\fP(void) throw()=0 virtual WyRet \fB_swap\fP(Wy_SockAddr&) throw()=0 virtual Wy_SockAddr* \fB_alloc\fP(WyRet&) const=0 virtual struct ::sockaddr& \fBc_sockaddr\fP(void) throw()=0 virtual const struct ::sockaddr& \fBc_sockaddr\fP(void) const throw()=0 virtual size_t \fBc_sockaddr_size\fP(void) const throw()=0 virtual socklen_t& \fBc_addrlen\fP(void) throw()=0 virtual const socklen_t& \fBc_addrlen\fP(void) const throw()=0.SH "DESCRIPTION".\"--------------------------------------------.PP.BI "~Wy_SockAddr()".PP    Destruct *this.\"--------------------------------------------.PP.BI "int family(void) const throw()".PP    Get socket address family.PP     [\fBRet\fP] Address family (e.g. AF_LOCAL,AF_INET,...).\"--------------------------------------------.PP.BI "virtual WyRet notation(WyStr& " "buf" ") const".PP    Get the socket address text notation of *this and reset \fIbuf\fP with    the result.    Note: data buffer of \fIbuf\fP may change.PP     [\fBRet\fP] Ok              Succeed          Wym_ENOMEM      Not enough memory.PP     [\fBRefer\fP] ::inet_ntop(int,const void*,char*,size_t).\"--------------------------------------------.PP.BI "virtual void reset(void) throw()".PP    Set *this to the state as the default object.\"--------------------------------------------.PP.BI "virtual WyRet _swap(Wy_SockAddr& " "addr" ") throw()".PP    Interchange state of *this with \fIaddr\fP.PP    [\fBRet\fP] Ok              Succeed          Wym_EBADTYPE    \fIaddr\fP is not the same type as *this.\"--------------------------------------------.PP.BI "virtual Wy_SockAddr* _alloc(WyRet& " "r" ") const".PP    Allocate a default object of the most inherited type that    *this refers.    Note: Inhertied class must override this member    \fIr\fP is reset with the return status:            Wym_ENOMEM      Not enough memory            Wym_ENOSYS      *Not overridden            ...             Same from constructing Wy_SockAddr().PP    [\fBRet\fP] Pointer of the allocated object, or NULL if failed.          User is responsible to \fBdelete\fP the returned object..\"--------------------------------------------.PP.BI "virtual struct ::sockaddr& c_sockaddr(void) throw()".PP.BI "virtual const struct ::sockaddr& c_sockaddr(void) const throw()".PP    Get (const)reference of the implementing socket address structure    The implementing socket address structure should be struct    sockaddr_un, sockaddr_in, etc. that ::accpet can write or    ::connect can read correctly. The returned value is reference    of such structure cast to sockaddr struct reference..PP    [\fBRet\fP] Reference of the implementing socket address structure.\"--------------------------------------------.PP.BI " virtual size_t c_sockaddr_size(void) const throw()".PP    Get the size of the implementing socket address structure.PP    [\fBRet\fP] Size of the implementing socket address structure.\"--------------------------------------------.PP.BI "virtual socklen_t& c_addrlen(void) throw()".PP.BI "virtual const socklen_t& c_addrlen(void) const throw()".PP    Get (const)reference of the socklen_t object that indicates    the effective length of the socket address.PP    [\fBRet\fP] Reference of the socklen_t object.\"--------------------------------------------.SH "SEE ALSO".BR wysockaddrlocal.BR wysockaddrinet4.BR wysockfile.BR wyfifofile.BR wy_dirfile.BR wyregfile.SH NOTEProject is in development, http://sourceforge.net/projects/libwx

⌨️ 快捷键说明

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