openRtsp分析(二)
resultCode = 0;
resultString = numBodyBytes > 0 strDup(bodyStart) : strDup(publicParamsStr);
// Note: The "strDup(bodyStart)" call assumes that the body is encoded without interior '\0' bytes
} else {
resultCode = responseCode;
resultString = strDup(responseStr);
envir().setResultMsg(responseStr);
}
(*foundRequest->handler())(this, resultCode, resultString);
} else {
// An error occurred parsing the response, so call the handler, indicating an error:
handleRequestError(foundRequest);
}
}
这里面的(*foundRequest->handler())(this, resultCode, resultString);就是执行 getOptions(continueAfterOPTIONS);中的continueAfterOPTIONS。
通过对option命令的发送和接收可以看到其他的命令的发送和接收是差不多的流程,详细过程就不一一列出。