SYNTAX

       #include "socket_if.h"

       int socket_tcp4();
       int socket_tcp6();
       int socket_tcp();


DESCRIPTION

       socket_tcp4 creates a non-blocking TCP/IPv4 stream socket and providing
       a file descriptor pointing to that socket.

       socket_tcp6 creates a non-blocking TCP/IPv6 stream socket and providing
       a file descriptor pointing to that socket.

       socket_tcp creates a non-blocking IPv6 TCP/IP socket calling
       socket_tcp6 unless ipv4socket=1, now facilitating socket_tcp4.


REMOTE CODES

       All these routines return 0 except in case of failures, returning -1
       and setting errno appropriately, without allocating any resources.


EXAMPLE

         #include <socket_if.h>

         int t, u;
         char localip[16];
         char remoteip[16];
         uint16 p;

         ipv4socket = ip6_isv4mapped(ip);

         t = socket_tcp();
         socket_bind(t,localip,0);
         socket_connect(t,remoteip,p,0);


SEE ALSO

       socket_if(3), socket_bind(3), socket_connect(3), socket_info(3),
       socket_recv(3), socket_send(3), socket_setup(3), socket_udp(3)



                                       3                    qlibs:(socket_tcp)

Man(1) output converted with man2html