Is a connection established on a socket?
#include <socket.h>
int socket_connected(int s);
socket_connected returns 1 if s is a socket and a connection is established, 0 otherwise.
socket_remote4(3), socket_remote6(3)