int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), char *context)
int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), unsigned char *context)
int do_server(int port, int type, int *ret, int (*cb)(char *hostname, int s, unsigned char *context), char *context)	{	int sock;	char *name = NULL;	int accept_socket;	int i;	if (!init_server(&accept_socket,port,type)) return(0);	if (ret != NULL)		{		*ret=accept_socket;		/* return(1);*/		}  	for (;;)  		{		if (type==SOCK_STREAM)			{			if (do_accept(accept_socket,&sock,&name) == 0)				{				SHUTDOWN(accept_socket);				return(0);				}			}		else			sock = accept_socket;		i=(*cb)(name,sock, context);		if (name != NULL) OPENSSL_free(name);		if (type==SOCK_STREAM)			SHUTDOWN2(sock);		if (i < 0)			{			SHUTDOWN2(accept_socket);			return(i);			}		}	}