home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / libncftp / older_versions / libncftp-3.1.5-src.tar.gz / libncftp-3.1.5-src.tar / libncftp-3.1.5 / sio / SConnectByName.c < prev    next >
C/C++ Source or Header  |  2001-11-19  |  341b  |  17 lines

  1. #include "syshdrs.h"
  2. #ifdef PRAGMA_HDRSTOP
  3. #    pragma hdrstop
  4. #endif
  5.  
  6. int
  7. SConnectByName(int sfd, const char * const addrStr, const int tlen)
  8. {
  9.     int result;
  10.     struct sockaddr_in remoteAddr;
  11.  
  12.     if ((result = AddrStrToAddr(addrStr, &remoteAddr, -1)) == 0) {
  13.         result = SConnect(sfd, &remoteAddr, tlen);
  14.     }
  15.     return (result);
  16. }    /* SConnectByName */
  17.