diff options
author | Nikias Bassen | 2020-05-18 02:43:12 +0200 |
---|---|---|
committer | Nikias Bassen | 2020-05-18 02:43:12 +0200 |
commit | 39e9819235738f2217b97ccb72271d703978adfe (patch) | |
tree | 8c52604b41caaca63f888a921fdc445372c6def6 /common/socket.h | |
parent | a4ed7a3f63bbcb72721f20d625293b6647b045c0 (diff) | |
download | libusbmuxd-39e9819235738f2217b97ccb72271d703978adfe.tar.gz libusbmuxd-39e9819235738f2217b97ccb72271d703978adfe.tar.bz2 |
socket: Add new functions socket_connect_addr() and socket_addr_to_string()
Diffstat (limited to 'common/socket.h')
-rw-r--r-- | common/socket.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/socket.h b/common/socket.h index e31de6b..38eeddf 100644 --- a/common/socket.h +++ b/common/socket.h @@ -1,8 +1,8 @@ /* * socket.h * + * Copyright (C) 2012-2020 Nikias Bassen <nikias@gmx.li> * Copyright (C) 2012 Martin Szulecki <m.szulecki@libimobiledevice.org> - * Copyright (C) 2012 Nikias Bassen <nikias@gmx.li> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -46,6 +46,7 @@ int socket_create_unix(const char *filename); int socket_connect_unix(const char *filename); #endif int socket_create(uint16_t port); +int socket_connect_addr(struct sockaddr *addr, uint16_t port); int socket_connect(const char *addr, uint16_t port); int socket_check_fd(int fd, fd_mode fdm, unsigned int timeout); int socket_accept(int fd, uint16_t port); @@ -62,4 +63,6 @@ int socket_send(int fd, void *data, size_t size); void socket_set_verbose(int level); +const char *socket_addr_to_string(struct sockaddr *addr, char *addr_out, size_t addr_out_size); + #endif /* SOCKET_SOCKET_H */ |