KNetwork::KInetSocketAddress Class Reference
#include <ksocketaddress.h>
Inheritance diagram for KNetwork::KInetSocketAddress:

Detailed Description
an Internet socket addressAn Inet (IPv4 or IPv6) socket address
This is an IPv4 or IPv6 address of the Internet.
- Author:
- Thiago Macieira <thiago.macieira@kdemail.net>
Definition at line 641 of file ksocketaddress.h.
Public Member Functions | |
KInetSocketAddress () | |
KInetSocketAddress (const sockaddr *sa, Q_UINT16 len) | |
KInetSocketAddress (const KIpAddress &host, Q_UINT16 port) | |
KInetSocketAddress (const KInetSocketAddress &other) | |
KInetSocketAddress (const KSocketAddress &other) | |
virtual | ~KInetSocketAddress () |
KInetSocketAddress & | operator= (const KInetSocketAddress &other) |
operator const sockaddr_in * () const | |
operator const sockaddr_in6 * () const | |
int | ipVersion () const |
KIpAddress | ipAddress () const |
KInetSocketAddress & | setHost (const KIpAddress &addr) |
Q_UINT16 | port () const |
KInetSocketAddress & | setPort (Q_UINT16 port) |
KInetSocketAddress & | makeIPv4 () |
KInetSocketAddress & | makeIPv6 () |
Q_UINT32 | flowinfo () const |
KInetSocketAddress & | setFlowinfo (Q_UINT32 flowinfo) |
int | scopeId () const |
KInetSocketAddress & | setScopeId (int scopeid) |
Protected Member Functions | |
KInetSocketAddress (KSocketAddressData *d) | |
Friends | |
class | KSocketAddress |
Constructor & Destructor Documentation
|
Public constructor. Creates an empty object. Definition at line 679 of file ksocketaddress.cpp. |
|
Creates an object from raw data.
Note: if the socket address
Definition at line 684 of file ksocketaddress.cpp. |
|
Creates an object from an IP address and port.
Definition at line 692 of file ksocketaddress.cpp. |
|
Copy constructor. Data is not shared.
Definition at line 699 of file ksocketaddress.cpp. |
|
Copy constructor. If the other, generic socket address contains an Internet address, it will be copied. Otherwise, this object will be empty.
Definition at line 705 of file ksocketaddress.cpp. |
|
Destroys this object.
Definition at line 719 of file ksocketaddress.cpp. |
Member Function Documentation
|
Returns the flowinfo information from the IPv6 socket address.
Definition at line 847 of file ksocketaddress.cpp. |
|
Returns the IP address component.
Definition at line 751 of file ksocketaddress.cpp. |
|
Returns the IP version of the address this object holds.
Definition at line 732 of file ksocketaddress.cpp. |
|
Converts this object to an IPv4 socket address. It has no effect if the object is already an IPv4 socket address. If this object is an IPv6 address, the port number is preserved. All other information is lost.
Definition at line 835 of file ksocketaddress.cpp. |
|
Converts this object to an IPv6 socket address. It has no effect if the object is already an IPv6 socket address. If this object is an IPv4 address, the port number is preserved.
Definition at line 841 of file ksocketaddress.cpp. |
|
Cast operator to sockaddr_in.
Definition at line 705 of file ksocketaddress.h. |
|
Cast operator to sockaddr_in6.
Definition at line 711 of file ksocketaddress.h. |
|
Copy operator. Copies the other object into this one.
Definition at line 725 of file ksocketaddress.cpp. |
|
Retrieves the port number stored in this object.
Definition at line 792 of file ksocketaddress.cpp. |
|
Returns the scope id this IPv6 socket is bound to.
Definition at line 866 of file ksocketaddress.cpp. |
|
Sets the flowinfo information for an IPv6 socket address. If this is not an IPv6 socket address, this function converts it to one. See makeIPv6.
Definition at line 859 of file ksocketaddress.cpp. |
|
Sets the IP address to the given raw address. This call will preserve port numbers accross IP versions, but will lose IPv6 specific data if the address is set to IPv4.
Definition at line 769 of file ksocketaddress.cpp. |
|
Sets the port number. If this object is empty, this function will default to creating an IPv4 address.
Definition at line 811 of file ksocketaddress.cpp. |
|
Sets the scope id for this IPv6 object. If this is not an IPv6 socket address, this function converts it to one. See makeIPv6
Definition at line 878 of file ksocketaddress.cpp. |
The documentation for this class was generated from the following files: