qlibs:

Section: Misc. Reference Manual Pages (timeoutconn)
Updated: 3
Index Return to Main Contents
 

NAME

timeoutconn - set up an outoing stream socket for IPv4/IPv6  

SYNTAX

#include "timeoutconn.h"

int timeoutconn4(int s,char ip[4],uint16 p,unsigned int t);
int timeoutconn6(int s,char ip[16],uint16 p,unsigned int t,uint32 netif);
int timeoutconn(int s,char ip[16],uint16 p,unsigned int t,uint32 netif);  

DESCRITPION

timeoutconn tries to establish a TCP stream socket to address ip on remoteport p and waiting for t seconds and on success returns the s socket identifier.

In case addresss is an IPv6 LLU address, one needs to define the netif interface index, otherwise 0 is the default.  

INTERNALS

timeoutconn depends on taia and iopuase to determine the timespan and perhaps ndelay to succeed.  

RETURN CODES

timeoutconn returns 0 if the connection is established and -1 if an error has occured.  

SEE ALSO

socket_if(3), timeout(3) taia(3), wait(3)


 

Index

NAME
SYNTAX
DESCRITPION
INTERNALS
RETURN CODES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:55:39 GMT, December 15, 2024