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

📄 wysockaddrinet4.3wy

📁 一个不错
💻 3WY
字号:
.\".\" Edited by I.J.Wang, 2004.\".TH WySockAddrINet4 3wy "libwy v0.31".SH NAMEWySockAddrINet4 \- class of socket address.SH SYNOPSIS.B #include <wysockaddrinet4.h>.PP[\fBInherit\fP] Wy_SockAddr (protocol class).PPWySockAddrINet4 is a discardable class for IPv4 socket address (wrapper of struct ::sockaddr_in ,family= AF_INET)..SH "PUBLIC MEMBERS" static int \fBfamily\fP(void) throw() \fBWySockAddrINet4\fP() throw() \fBWySockAddrINet4\fP(const WySockAddrINet4&) throw() \fBWySockAddrINet4\fP(const ::sockaddr_in&) throw() \fBWySockAddrINet4\fP(const WySockAddrINet4::IPAddr&,uint16_t) throw() \fBWySockAddrINet4\fP(WySockAddrINet4&, Wy::ByMove_t) throw() bool \fBis_default\fP(void) const throw() WySockAddrINet4::IPAddr \fBip\fP(void) const throw() uint16_t \fBport\fP(void) const throw() virtual WyRet \fBnotation\fP(WyStr&) const virtual void \fBreset\fP(void) throw() virtual void \fBreset\fP(const WySockAddrINet4&) throw() virtual void \fBreset\fP(const ::sockaddr_in&) throw() virtual void \fBreset\fP(const WySockAddrINet4::IPAddr&,uint16_t) throw() virtual WyRet \fB_swap\fP(Wy_SockAddr&) throw() virtual WySockAddrINet4* \fB_alloc\fP(WyRet&) const virtual const WySockAddrINet4& \fBoperator =\fP(const WySockAddrINet4&) throw() bool \fBoperator ==\fP(const WySockAddrINet4&) const throw() bool \fBoperator !=\fP(const WySockAddrINet4&) const throw().SH "DESCRIPTION".\"--------------------------------------------.PP.BI "static int family(void) throw().PP    Get socket address family.PP     [\fBRet\fP] Always AF_INET.\"--------------------------------------------.PP.BI "WySockAddrINet4() throw()".PP    Construct default object.      ip()    = WySockAddrINet4::IPAddr()      port()  = 0    See wyipaddr4(3wy) for WySockAddrINet4::IPAddr.\"--------------------------------------------.PP.BI "WySockAddrINet4(const WySockAddrINet4& " "addr" ") throw()".PP    Construct object by copy from \fIaddr\fP      ip()    = \fIaddr\fP.ip()      port()  = \fIaddr\fP.port().\"--------------------------------------------.PP.BI "WySockAddrINet4(const ::sockaddr_in& " "addr" ") throw()".PP    Construct object by copy from \fIaddr\fP      ip()    = from \fIaddr\fP.sin_addr.s_addr      port()  = from \fIaddr\fP.sin_port    Note: \fIaddr\fP.sin_family is ignored.\"--------------------------------------------.PP.BI "WySockAddrINet4(const WySockAddrINet4::IPAddr& " "ip" ", uint16_t " "port" ") throw()".PP    Construct IPv4 address of \fIip\fP and \fIport\fP      ip()    = \fIip\fP      port()  = \fIport\fP    See wyipaddr4(3wy) for WySockAddrINet4::IPAddr.\"--------------------------------------------.PP.BI "WySockAddrINet4(WySockAddrINet4& " "src" ", Wy::ByMove_t) throw()".PP    See Wy_Array(Wy_Array&, Wy::ByMove_t) in wy_array(3wy)    for definition of the move constructor..\"--------------------------------------------.PP.BI "bool is_default(void) const throw()".PP    Is *this equivalent to the default object.PP    [\fBRet\fP] true= *this is equivalent to WySockAddrINet4()         false= otherwise.\"--------------------------------------------.PP.BI "WySockAddrINet4::IPAddr ip(void) const throw()".PP    Get the IP address of *this    See wyipaddr4(3wy) for WySockAddrINet4::IPAddr.PP     [\fBRet\fP] IP address of *this.\"--------------------------------------------.PP.BI "uint16_t port(void) const throw()".PP    Get the port number of *this.PP     [\fBRet\fP] Port number of *this.\"--------------------------------------------.PP.BI "virtual WyRet notation(WyStr& " "buf" ") const".PP    Get the socket address text notation of *this by resetting \fIbuf\fP    with the result. The text notation is like "ddd.ddd.ddd.ddd:port".    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    Reconstruct *this to the state as WySockAddrINet4().\"--------------------------------------------.PP.BI "virtual void reset(const WySockAddrINet4& " "addr" ") throw()".PP    Reconstruct *this to the state as WySockAddrINet4(\fIaddr\fP).\"--------------------------------------------.PP.BI "virtual void reset(const ::sockaddr_in& " "addr" ") throw()".PP    Reconstruct *this to the state as WySockAddrINet4(\fIaddr\fP)    Note: \fIaddr\fP.sin_family is ignored.\"--------------------------------------------.PP.BI "virtual void reset(const WySockAddrINet4::IPAddr& " "ip" ", uint16_t " "port" ") throw()".PP    Reconstruct *this to the state as WySockAddrINet4(\fIip\fP,\fIport\fP).\"--------------------------------------------.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 WySockAddrINet4* _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 WySockAddrINet4().PP    [\fBRet\fP] Pointer of the allocated object, or NULL if failed.          User is responsible to \fBdelete\fP the returned object..\"--------------------------------------------.PP.BI "virtual const WySockAddrINet4& operator =(const WySockAddrINet4& " "addr" ") throw()".PP    Assign *this to the state as WySockAddrINet4(\fIaddr\fP).PP     [\fBRet\fP] Const reference of *this.\"--------------------------------------------.PP .BI "bool operator ==(const WySockAddrINet4& " "rhs" ") const throw()".PP.BI "bool operator !=(const WySockAddrINet4& " "rhs" ") const throw()".PP     Test equivalence of *this with \fIrhs\fP    this->operator==(\fIrhs\fP) yields true iff      (this->\fBip\fP()==\fIrhs\fP.\fBip\fP())&&      (this->\fBport\fP()==\fIrhs\fP.\fBport\fP()).PP     [\fBRet\fP] true= relation holds         false= otherwise.\"--------------------------------------------.SH "SEE ALSO".BR ip(7).BR wyipaddr4.BR wysockaddrinet6.BR wysockaddrlocal.BR wysockfile.BR wychrfile.BR wyterminal.BR wyregfile.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 + -