#import "OFString.h"
#import "socket.h"
Go to the source code of this file.
void of_address_to_string_and_port |
( |
struct sockaddr * |
address, |
|
|
socklen_t |
addressLength, |
|
|
OFString *__autoreleasing OF_NONNULL *OF_NULLABLE |
host, |
|
|
uint16_t *OF_NULLABLE |
port |
|
) |
| |
Converts the specified address to a string and port pair.
- Parameters
-
address | The address to convert to a string |
addressLength | The length of the address to convert to a string |
host | A pointer to an OFString* which should be set to the host of the address or NULL if the host is not needed |
port | A pointer to an uint16_t which should be set to the port of the address or NULL if the port is not needed |
Resolves the specified host.
- Parameters
-
host | The host to resolve |
port | The port that should be inserted into the resulting address struct |
protocol | The protocol that should be inserted into the resulting address struct |
- Returns
- An array of results. The list is terminated by NULL and should be free'd after use.