home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / ncftp / older_versions / ncftp-3.2.2-src.tar.bz2 / ncftp-3.2.2-src.tar / ncftp-3.2.2 / sio / UConnect.c < prev    next >
C/C++ Source or Header  |  2003-08-31  |  476b  |  21 lines

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