


socketpair(3)                                       socketpair(3)


NNAAMMEE
       socketpair - create a pair of connected sockets

SSYYNNOOPPSSIISS
       ##iinncclluuddee <<ssyyss//ssoocckkeett..hh>>

       iinntt ssoocckkeettppaaiirr((iinntt aaff,, iinntt ttyyppee,, iinntt pprroottooccooll,, iinntt ssvv[[22]]));;

DDEESSCCRRIIPPTTIIOONN
       _s_o_c_k_e_t_p_a_i_r creates an unnamed pair  of  connected  sockets
       and  returns two file descriptors in _s_v[0] and _s_v[1].  The
       two  sockets  are  indistinguishable.   _a_f  specifies  the
       address family.  See _s_o_c_k_e_t(3).  _t_y_p_e specifies the seman-
       tics of communication for the socket.  _p_r_o_t_o_c_o_l  specifies
       a  particular  protocol  to be used.  _p_r_o_t_o_c_o_l can be sup-
       plied as zero, in which case the system chooses a protocol
       type to use.

RREETTUURRNN VVAALLUUEESS
       Upon  successful  completion,  a  value  of 0 is returned.
       Otherwise, a value of -1 is returned and eerrrrnnoo is  set  to
       indicate the error.

DDIIAAGGNNOOSSTTIICCSS
       The socketpair call fails if :

              [ENOENT]                 The  socket  device driver
                                       has not been started.

              [EMFILE]                 The    per-process    file
                                       descriptor  table is full.

              [EAFNOSUPPORT]           The specified address fam-
                                       ily is not supported.

              [ESOCKTNOSUPPORT]        The  specified socket type
                                       is not supported  in  this
                                       address family.

              [EPROTONOSUPPORT]        The  specified protocol is
                                       not supported.

              [EOPNOSUPPORT]           The   specified   protocol
                                       does  not support creation
                                       of socket pairs.

              [ENOMEM]                 Insufficient     resources
                                       were available in the sys-
                                       tem to perform the  opera-
                                       tion.

              [EPROTOTYPE]             The  type  of  socket  and
                                       protocol do not match.




                             MiNT-Net                           1





socketpair(3)                                       socketpair(3)


DDEEPPEENNDDEENNCCIIEESS
       This call is supported only for AF_UNIX.

SSEEEE AALLSSOO
       read(3), write(3), socket(3).




















































                             MiNT-Net                           2


