.TH "KNetwork::KInetSocketAddress" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNetwork::KInetSocketAddress \- an Internet socket address  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <ksocketaddress.h>\fP
.PP
Inherits \fBKNetwork::KSocketAddress\fP.
.PP
Inherited by KNetwork::KSocketAddressData::QMixSocketAddressRef.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKInetSocketAddress\fP ()"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP (const sockaddr *sa, Q_UINT16 len)"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP (const \fBKIpAddress\fP &host, Q_UINT16 port)"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP (const \fBKInetSocketAddress\fP &other)"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP (const \fBKSocketAddress\fP &other)"
.br
.ti -1c
.RI "virtual \fB~KInetSocketAddress\fP ()"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBoperator=\fP (const \fBKInetSocketAddress\fP &other)"
.br
.ti -1c
.RI "\fBoperator const sockaddr_in *\fP () const "
.br
.ti -1c
.RI "\fBoperator const sockaddr_in6 *\fP () const "
.br
.ti -1c
.RI "int \fBipVersion\fP () const "
.br
.ti -1c
.RI "\fBKIpAddress\fP \fBipAddress\fP () const "
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBsetHost\fP (const \fBKIpAddress\fP &addr)"
.br
.ti -1c
.RI "Q_UINT16 \fBport\fP () const "
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBsetPort\fP (Q_UINT16 port)"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBmakeIPv4\fP ()"
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBmakeIPv6\fP ()"
.br
.ti -1c
.RI "Q_UINT32 \fBflowinfo\fP () const "
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBsetFlowinfo\fP (Q_UINT32 flowinfo)"
.br
.ti -1c
.RI "int \fBscopeId\fP () const "
.br
.ti -1c
.RI "\fBKInetSocketAddress\fP & \fBsetScopeId\fP (int scopeid)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBKInetSocketAddress\fP (KSocketAddressData *d)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKSocketAddress\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
an Internet socket address 

An Inet (IPv4 or IPv6) socket address
.PP
This is an IPv4 or IPv6 address of the Internet.
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP

.PP
Definition at line 641 of file ksocketaddress.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KInetSocketAddress::KInetSocketAddress ()"
.PP
Public constructor. 
.PP
Creates an empty object. 
.PP
Definition at line 677 of file ksocketaddress.cpp.
.SS "KInetSocketAddress::KInetSocketAddress (const sockaddr * sa, Q_UINT16 len)"
.PP
Creates an object from raw data. 
.PP
Note: if the socket address \fCsa\fP does not contain a valid Internet socket (IPv4 or IPv6), this object will be empty.
.PP
\fBParameters:\fP
.RS 4
\fIsa\fP the sockaddr structure 
.br
\fIlen\fP the structure's length 
.RE
.PP

.PP
Definition at line 682 of file ksocketaddress.cpp.
.SS "KInetSocketAddress::KInetSocketAddress (const \fBKIpAddress\fP & host, Q_UINT16 port)"
.PP
Creates an object from an IP address and port. 
.PP
\fBParameters:\fP
.RS 4
\fIhost\fP the IP address 
.br
\fIport\fP the port number 
.RE
.PP

.PP
Definition at line 690 of file ksocketaddress.cpp.
.PP
References setHost(), and setPort().
.SS "KInetSocketAddress::KInetSocketAddress (const \fBKInetSocketAddress\fP & other)"
.PP
Copy constructor. 
.PP
Data is not shared.
.PP
\fBParameters:\fP
.RS 4
\fIother\fP the other object 
.RE
.PP

.PP
Definition at line 697 of file ksocketaddress.cpp.
.SS "KInetSocketAddress::KInetSocketAddress (const \fBKSocketAddress\fP & other)"
.PP
Copy constructor. 
.PP
If the other, generic socket address contains an Internet address, it will be copied. Otherwise, this object will be empty.
.PP
\fBParameters:\fP
.RS 4
\fIother\fP the other object 
.RE
.PP

.PP
Definition at line 703 of file ksocketaddress.cpp.
.SS "KInetSocketAddress::~\fBKInetSocketAddress\fP ()\fC [virtual]\fP"
.PP
Destroys this object. 
.PP
Definition at line 717 of file ksocketaddress.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::operator= (const \fBKInetSocketAddress\fP & other)"
.PP
Copy operator. 
.PP
Copies the other object into this one.
.PP
\fBParameters:\fP
.RS 4
\fIother\fP the other object 
.RE
.PP

.PP
Definition at line 723 of file ksocketaddress.cpp.
.SS "KNetwork::KInetSocketAddress::operator const sockaddr_in * () const\fC [inline]\fP"
.PP
Cast operator to sockaddr_in. 
.PP
Definition at line 705 of file ksocketaddress.h.
.PP
References KSocketAddress::address().
.SS "KNetwork::KInetSocketAddress::operator const sockaddr_in6 * () const\fC [inline]\fP"
.PP
Cast operator to sockaddr_in6. 
.PP
Definition at line 711 of file ksocketaddress.h.
.PP
References KSocketAddress::address().
.SS "int KInetSocketAddress::ipVersion () const"
.PP
Returns the IP version of the address this object holds. 
.PP
\fBReturns:\fP
.RS 4
4 or 6, if IPv4 or IPv6, respectively; 0 if this object is empty 
.RE
.PP

.PP
Definition at line 730 of file ksocketaddress.cpp.
.SS "\fBKIpAddress\fP KInetSocketAddress::ipAddress () const"
.PP
Returns the IP address component. 
.PP
Definition at line 749 of file ksocketaddress.cpp.
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::setHost (const \fBKIpAddress\fP & addr)"
.PP
Sets the IP address to the given raw address. 
.PP
This call will preserve port numbers accross IP versions, but will lose IPv6 specific data if the address is set to IPv4.
.PP
\fBParameters:\fP
.RS 4
\fIaddr\fP the address to set to 
.RE
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 767 of file ksocketaddress.cpp.
.PP
References makeIPv4(), and makeIPv6().
.PP
Referenced by KInetSocketAddress().
.SS "Q_UINT16 KInetSocketAddress::port () const"
.PP
Retrieves the port number stored in this object. 
.PP
\fBReturns:\fP
.RS 4
a port number in the range 0 to 65535, inclusive. An empty or invalid object will have a port number of 0. 
.RE
.PP

.PP
Definition at line 790 of file ksocketaddress.cpp.
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::setPort (Q_UINT16 port)"
.PP
Sets the port number. 
.PP
If this object is empty, this function will default to creating an IPv4 address.
.PP
\fBParameters:\fP
.RS 4
\fIport\fP the port number to set 
.RE
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 809 of file ksocketaddress.cpp.
.PP
References makeIPv4().
.PP
Referenced by KInetSocketAddress().
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::makeIPv4 ()"
.PP
Converts this object to an IPv4 socket address. 
.PP
It has no effect if the object is already an IPv4 socket address.
.PP
If this object is an IPv6 address, the port number is preserved. All other information is lost.
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 833 of file ksocketaddress.cpp.
.PP
Referenced by setHost(), and setPort().
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::makeIPv6 ()"
.PP
Converts this object to an IPv6 socket address. 
.PP
It has no effect if the object is already an IPv6 socket address.
.PP
If this object is an IPv4 address, the port number is preserved.
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 839 of file ksocketaddress.cpp.
.PP
Referenced by setFlowinfo(), setHost(), and setScopeId().
.SS "Q_UINT32 KInetSocketAddress::flowinfo () const"
.PP
Returns the flowinfo information from the IPv6 socket address. 
.PP
\fBReturns:\fP
.RS 4
the flowinfo information or 0 if this object is empty or IPv4 
.RE
.PP

.PP
Definition at line 845 of file ksocketaddress.cpp.
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::setFlowinfo (Q_UINT32 flowinfo)"
.PP
Sets the flowinfo information for an IPv6 socket address. 
.PP
If this is not an IPv6 socket address, this function converts it to one. 
.PP
\fBSee also:\fP
.RS 4
\fBmakeIPv6\fP.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIflowinfo\fP the flowinfo to set 
.RE
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 857 of file ksocketaddress.cpp.
.PP
References makeIPv6().
.SS "int KInetSocketAddress::scopeId () const"
.PP
Returns the scope id this IPv6 socket is bound to. 
.PP
\fBReturns:\fP
.RS 4
the scope id, or 0 if this is not an IPv6 object 
.RE
.PP

.PP
Definition at line 864 of file ksocketaddress.cpp.
.SS "\fBKInetSocketAddress\fP & KInetSocketAddress::setScopeId (int scopeid)"
.PP
Sets the scope id for this IPv6 object. 
.PP
If this is not an IPv6 socket address, this function converts it to one. 
.PP
\fBSee also:\fP
.RS 4
\fBmakeIPv6\fP
.RE
.PP
\fBParameters:\fP
.RS 4
\fIscopeid\fP the scopeid to set 
.RE
.PP
\fBReturns:\fP
.RS 4
a reference to itself 
.RE
.PP

.PP
Definition at line 876 of file ksocketaddress.cpp.
.PP
References makeIPv6().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
