home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / libncftp / libncftp-3.2.5-src.zip / libncftp-3.2.5 / sio / UConnect.c < prev    next >
C/C++ Source or Header  |  2009-11-30  |  526b  |  25 lines

  1. #include "syshdrs.h"
  2. #ifdef PRAGMA_HDRSTOP
  3. #    pragma hdrstop
  4. #endif
  5.  
  6. #ifdef HAVE_SYS_UN_H
  7.  
  8. extern int _SConnect(const int sfd, const struct sockaddr_in *const addr, const size_t saddrsiz, const int tlen);
  9.  
  10. int
  11. UConnect(int sfd, const struct sockaddr_un *const addr, int ualen, int tlen)
  12. {
  13.     int result;
  14.     
  15.     if ((addr == NULL) || (ualen == 0)) {
  16.         errno = EINVAL;
  17.         return (-1);
  18.     }
  19.     
  20.     result = _SConnect(sfd, (const struct sockaddr_in *) addr, (size_t) ualen, tlen);
  21.     return (result);
  22. }    /* UConnect */
  23.  
  24. #endif    /* HAVE_SYS_UN_H */
  25.