From 96cf8dffe4f7b0b910f790066ae622dc429eb522 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 13:02:45 +0200 Subject: initial commit of version 23 --- man/timeoutconn.3 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 man/timeoutconn.3 (limited to 'man/timeoutconn.3') diff --git a/man/timeoutconn.3 b/man/timeoutconn.3 new file mode 100644 index 0000000..dad9e95 --- /dev/null +++ b/man/timeoutconn.3 @@ -0,0 +1,52 @@ +.TH qlibs: timeoutconn 3 +.SH NAME +timeoutconn \- set up an outoing stream socket for IPv4/IPv6 +.SH SYNTAX +.B #include \(dqtimeoutconn.h\(dq + +int \fBtimeoutconn4\fP(int \fIs\fR,char \fIip[4]\fR,uint16 \fIp\fR,unsigned int \fIt\fR); +.br +int \fBtimeoutconn6\fP(int \fIs\fR,char \fIip[16]\fR,uint16 \fIp\fR,unsigned int \fIt\fR,uint32 \fInetif\fR); +.br +int \fBtimeoutconn\fP(int \fIs\fR,char \fIip[16]\fR,uint16 \fIp\fR,unsigned int \fIt\fR,uint32 \fInetif\fR); +.SH DESCRITPION +.B timeoutconn +tries to establish a TCP stream socket to address +.I ip +on remoteport +.I p +and waiting for +.I t +seconds and on success returns the +.I s +socket identifier. + +In case +.I addresss +is an IPv6 LLU address, one needs to define the +.I netif +interface index, otherwise +.I 0 +is the default. +.SH INTERNALS +.B timeoutconn +depends on +.B taia +and +.B iopuase +to determine the timespan and perhaps +.B ndelay +to succeed. +.SH RETURN CODES +.B timeoutconn +returns +.I 0 +if the connection is established +and +.I -1 +if an error has occured. +.SH SEE ALSO +socket_if(3), +timeout(3) +taia(3), +wait(3) -- cgit v1.2.3