FPRINTF(stderr, "PR_Write wrote %d bytes from bigBuf\n", count );
FPRINTF(stderr, "selfserv: PR_Write wrote %d bytes from bigBuf\n", count );
do_writes(    PRFileDesc *	ssl_sock,    PRFileDesc *	model_sock,    int         	requestCert    ){    int			sent  = 0;    int 		count = 0;    lockedVars *	lv = (lockedVars *)model_sock;    while (sent < bigBuf.len) {	count = PR_Write(ssl_sock, bigBuf.data + sent, bigBuf.len - sent);	if (count < 0) {	    errWarn("PR_Write bigBuf");	    break;	}	FPRINTF(stderr, "PR_Write wrote %d bytes from bigBuf\n", count );	sent += count;    }    if (count >= 0) {	/* last write didn't fail. */    	PR_Shutdown(ssl_sock, PR_SHUTDOWN_SEND);    }    /* notify the reader that we're done. */    lockedVars_AddToCount(lv, -1);    FLUSH;    return (sent < bigBuf.len) ? SECFailure : SECSuccess;}