infoObject->GetSocketPtr(&socket);  CMT_GetSSLDataErrorCode(control, socket, &errorCode);
infoObject->GetSocketPtr(&sock);  CMT_GetSSLDataErrorCode(control, sock, &errorCode);
nsSSLIOLayerWrite( PRFileDesc *fd, const void *buf, PRInt32 amount){    if (!fd)        return PR_FAILURE;    PRInt32 result = PR_Send(fd, buf, amount, 0, PR_INTERVAL_MIN);        if (result > 0)        return result;    if (result == -1)    {        PRErrorCode code = PR_GetError();        if (code == PR_IO_TIMEOUT_ERROR )            PR_SetError(PR_WOULD_BLOCK_ERROR, PR_WOULD_BLOCK_ERROR);        return PR_FAILURE;    }    if (result == 0)    {        nsPSMSocketInfo *infoObject    = (nsPSMSocketInfo *)fd->secret;        PRDescIdentity          id     = PR_GetLayersIdentity(fd);        if (infoObject && id == nsSSLIOLayerIdentity)        {            CMInt32 errorCode = PR_FAILURE;            CMT_CONTROL* control;            CMSocket*    socket;                infoObject->GetControlPtr(&control);            infoObject->GetSocketPtr(&socket);            CMT_GetSSLDataErrorCode(control, socket, &errorCode);            PR_SetError(0, 0);            return errorCode;        }    }    return result;}