int init_client(int *sock, char *host, int port, int type)
	{
	unsigned char ip[4];

	memset(ip, '\0', sizeof ip);
	if (!host_ip(host,&(ip[0])))
		return 0;
	return init_client_ip(sock,ip,port,type);
	}
Exemple #2
0
int init_client(int *sock, const char *host, int port, int type)
{
    unsigned char ip[4];

    ip[0] = ip[1] = ip[2] = ip[3] = 0;
    if (!host_ip(host, &(ip[0])))
        return 0;
    return init_client_ip(sock, ip, port, type);
}
int init_client(int *sock, char *host, int port, int type)
	{
	unsigned char ip[4];

	if (!host_ip(host,&(ip[0])))
		{
		return(0);
		}
	return(init_client_ip(sock,ip,port,type));
	}
int init_client(int *sock, char *host, int port)
{
    unsigned char ip[4];
    short p=0;

    if (!host_ip(host,&(ip[0])))
    {
        return(0);
    }
    if (p != 0) port=p;
    return(init_client_ip(sock,ip,port));
}