lib/libvarnish/vtcp.c
int
VTCP_listen(const struct suckaddr *sa, int depth, const char **errp)
{
	int sd;
	int e;

	if (errp != NULL)
		*errp = NULL;
	sd = VTCP_bind(sa, errp);
	if (sd >= 0)  {
		if (listen(sd, depth) != 0) {
			e = errno;
			closefd(&sd);
			errno = e;
			if (errp != NULL)
				*errp = "listen(2)";
			return (-1);
		}
	}
	return (sd);
}
/*--------------------------------------------------------------------
 * Given a struct suckaddr, open a socket of the appropriate type, bind it
 * to the requested address, and start listening.
 */
Given a struct suckaddr, open a socket of the appropriate type, bind it
to the requested address, and start listening.
Given a struct suckaddr open a socket of the appropriate type bind it to the requested address and start listening .
int
VTCP_listen(const struct suckaddr *sa, int depth, const char **errp)
{
	int sd;
	int e;
	if (errp != NULL)
		*errp = NULL;
	sd = VTCP_bind(sa, errp);
	if (sd >= 0)  {
		if (listen(sd, depth) != 0) {
			e = errno;
			closefd(&sd);
			errno = e;
			if (errp != NULL)
				*errp = "listen(2)";
			return (-1);
		}
	}
	return (sd);
}
int VTCP_listen ( const struct suckaddr * sa , int depth , const char * * errp ) { int sd ; int e ; if ( errp != NULL ) * errp = NULL ; sd = VTCP_bind ( sa , errp ) ; if ( sd >= 0 ) { if ( listen ( sd , depth ) != 0 ) { e = errno ; closefd ( & sd ) ; errno = e ; if ( errp != NULL ) * errp = " " ; return ( -1 ) ; } } return ( sd ) ; }
Given a struct suckaddr, open a socket of the appropriate type, bind it
 to the requested address, and start listening.
Given a struct suckaddr open a socket of the appropriate type bind it to the requested address and start listening .