library/src/network/BP-Network.cc
// This routine converts a proxy type to an ASCII character string.  Used
// primarily for displaying proxy information.
This routine converts a proxy type to an ASCII character string.  Used
primarily for displaying proxy information.
This routine converts a proxy type to an ASCII character string . Used primarily for displaying proxy information .
char * BP_NetProxyGetAsciiFromProxyType(BP_NETWORK_PROXY_TYPE proxy_type)
{
	if(!proxy_type)
		return NULL;
	switch(proxy_type)
	{
		case BP_NETWORK_PROXY_TYPE_SOCKS4A:
			return bpstrdup("BP_NETWORK_PROXY_TYPE_SOCKS4A");
		case BP_NETWORK_PROXY_TYPE_SOCKS5:
			return bpstrdup("BP_NETWORK_PROXY_TYPE_SOCKS5");
		case BP_NETWORK_PROXY_TYPE_CONNECT:
			return bpstrdup("BP_NETWORK_PROXY_TYPE_CONNECT");
			break;
		default:
			break;
	}
	return NULL;
}
char * BP_NetProxyGetAsciiFromProxyType ( BP_NETWORK_PROXY_TYPE proxy_type ) { if ( ! proxy_type ) return NULL ; switch ( proxy_type ) { case BP_NETWORK_PROXY_TYPE_SOCKS4A : return bpstrdup ( " " ) ; case BP_NETWORK_PROXY_TYPE_SOCKS5 : return bpstrdup ( " " ) ; case BP_NETWORK_PROXY_TYPE_CONNECT : return bpstrdup ( " " ) ; break ; default : break ; } return NULL ; }
This routine converts a proxy type to an ASCII character string.
This routine converts a proxy type to an ASCII character string .
// ensure we've gotten a proxy type (zero = unset) // switch on the proxy type // socks4a type // socks5 type // connect type // default // return null on failure