|
|
An Inet (IPv4 or IPv6) socket address
This is an IPv4 or IPv6 address of the Internet
This class inherits most of the functionality from KSocketAddress, but is targeted specifically to Internet addresses
| |
Default constructor. Does nothing
| |
Creates an IPv4 socket from raw sockaddr_in
Parameters:
| sin | a sockaddr_in structure to copy from |
| |
Creates an IPv6 socket from raw sockaddr_in6
Parameters:
| sin6 | a sockaddr_in6 structure to copy from |
| |
Creates a socket from information
Parameters:
| addr | a binary address |
| port | a port number |
| |
Creates a socket from information
Parameters:
| addr | a binary address |
| port | a port number |
| |
Creates a socket from text representation
Parameters:
| addr | a text representation of the address |
| port | a port number |
| ~ |
[virtual]
Destructor
| bool |
Sets this socket to given raw socket
Parameters:
| sin | the raw socket |
| bool |
Sets this socket to given raw socket
Parameters:
| sin6 | the raw socket |
| bool |
Sets this socket to raw address and port
Parameters:
| addr | the address |
| port | the port number |
| bool |
Sets this socket to raw address and port
Parameters:
| addr | the address |
| port | the port number |
| bool |
Sets this socket to text address and port
Parameters:
| addr | the address |
| port | the port number |
| family | the address family, -1 for any |
| bool |
Sets this socket's host address to given raw address
Parameters:
| addr | the address |
| bool |
Sets this socket's host address to given raw address
Parameters:
| addr | the address |
| bool |
Sets this socket's host address to given text representation
Parameters:
| addr | the address |
| family | the address family, -1 for any |
| bool |
Sets this socket's port number to given port number
Parameters:
| port | the port number |
| bool |
Turns this into an IPv4 or IPv6 address returns 0 if this is v6 and information was lost
| bool |
Sets flowinfo information for this socket address if this is IPv6
Parameters:
| flowinfo | flowinfo |
| bool |
Sets the scope id for this socket if this is IPv6
Parameters:
| scopeid | the scope id |
| QString |
[const virtual]
Returns a pretty representation of this address
Reimplemented from KSocketAddress
| QString |
[const]
Returns the text representation of the host address
| const sockaddr_in* |
[const]
Returns the socket address This will be NULL if this is a non-convertible v6
| const sockaddr_in6* |
[const]
Returns the socket address in IPv6
| in_addr |
[const]
Returns the host address Might be empty
| in6_addr |
[const]
Returns the host address WARNING: this function is not defined if there is no IPv6 support
| unsigned short |
[const]
Returns the port number
| int |
[const]
Returns the socket family
Reimplemented from KSocketAddress
| Q_UINT32 |
[const]
Returns flowinfo for IPv6 socket
| int |
[const]
Returns the scope id for this IPv6 socket
| ksocklen_t |
[const virtual]
Returns the socket length Will be either sizeof(sockaddr_in) or sizeof(sockaddr_in6)
Reimplemented from KSocketAddress
| bool |
[const virtual]
This kind of socket supports core comparation. This will compare the IP part of the sockets only.
Parameters:
| other | the other socket |
Reimplemented from KSocketAddress
| |
[const]
Returns the socket address This will be NULL if this is a non-convertible v6