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
/
UConnectByName.c
< prev
next >
Wrap
C/C++ Source or Header
|
2009-11-30
|
477b
|
26 lines
#include "syshdrs.h"
#ifdef PRAGMA_HDRSTOP
# pragma hdrstop
#endif
#ifdef HAVE_SYS_UN_H
int
UConnectByName(int sfd, const char * const addrStr, const int tlen)
{
int result;
struct sockaddr_un remoteAddr;
int ualen;
if ((addrStr == NULL) || (addrStr[0] == '\0')) {
errno = EINVAL;
return (-1);
}
ualen = MakeSockAddrUn(&remoteAddr, addrStr);
result = UConnect(sfd, &remoteAddr, ualen, tlen);
return (result);
} /* UConnectByName */
#endif /* HAVE_SYS_UN_H */