Пример #1
0
        M_DestroyConn($conn);
        return;
    }
    /* Set up information required to verify certificates */
    if ($MYVERIFYSSL) {
        if (!M_SetSSL_CAfile($conn, $MYCAFILE)) {
            echo "Could not set SSL CAFile. " . "Does the file exist?\r\n";
            M_DestroyConn($conn);
            return;
        }
        M_VerifySSLCert($conn, 1);
    }
} else {
    if (strcasecmp($MYMETHOD, "IP") == 0) {
        /* Set up IP Connection Location */
        if (!M_SetIP($conn, $MYHOST, $MYPORT)) {
            echo "Could not set method to IP\r\n";
            /* Free memory associated with conn */
            M_DestroyConn($conn);
            return;
        }
    } else {
        echo "Invalid method '" . $MYMETHOD . "' specified!\r\n";
        /* Free memory associated with conn */
        M_DestroyConn($conn);
        return;
    }
}
/* Set to blocking mode, means we do not have to
 * do a M_Monitor() loop, M_TransSend() will do this for us */
if (!M_SetBlocking($conn, 1)) {
Пример #2
0
 function MCVE_SetIP(&$conn, $host, $port)
 {
     return M_SetIP($conn, $host, $port);
 }