socket_remote4(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

socket_remote4 β€” get remote IP address of socket


✨ SYNTAX ✨

#include <libowfat/socket.h>

int socket_remote4(int s,char ip[4],uint16 *port);

πŸ’– DESCRIPTION πŸ’–

okay so bestie, listen up: socket_remote4 returns the remote IP address and port for the UDP or TCP socket s and writes the IP address to ip and the port to port. like it literally hands you the deets of who's on the other end πŸ’…

If something goes wrong, socket_remote4 returns -1, setting errno appropriately. so if you see that -1, check errno β€” it's giving "something went wrong" energy 😭


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole vibe, bestie β€” this was socket_remote4(3) from the Library Functions Manual. stay connected, stay iconic, and may your sockets always know who they're talking to 🫢✨