发送超时时间可配置
This commit is contained in:
parent
5304d81306
commit
0c460b397d
|
|
@ -102,8 +102,8 @@ get_mime_type(const char* name) {
|
|||
|
||||
HttpSession::HttpSession(const Socket::Ptr &pSock) : TcpSession(pSock) {
|
||||
TraceP(this);
|
||||
//设置15秒发送超时时间
|
||||
pSock->setSendTimeOutSecond(15);
|
||||
GET_CONFIG(uint32_t,keep_alive_sec,Http::kKeepAliveSecond);
|
||||
pSock->setSendTimeOutSecond(keep_alive_sec);
|
||||
//起始接收buffer缓存设置为4K,节省内存
|
||||
pSock->setReadBuffer(std::make_shared<BufferRaw>(4 * 1024));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ static int kSockFlags = SOCKET_DEFAULE_FLAGS | FLAG_MORE;
|
|||
|
||||
RtmpSession::RtmpSession(const Socket::Ptr &pSock) : TcpSession(pSock) {
|
||||
DebugP(this);
|
||||
//设置15秒发送超时时间
|
||||
pSock->setSendTimeOutSecond(15);
|
||||
GET_CONFIG(uint32_t,keep_alive_sec,Rtmp::kKeepAliveSecond);
|
||||
pSock->setSendTimeOutSecond(keep_alive_sec);
|
||||
//起始接收buffer缓存设置为4K,节省内存
|
||||
pSock->setReadBuffer(std::make_shared<BufferRaw>(4 * 1024));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ static int kSockFlags = SOCKET_DEFAULE_FLAGS | FLAG_MORE;
|
|||
|
||||
RtspSession::RtspSession(const Socket::Ptr &pSock) : TcpSession(pSock) {
|
||||
DebugP(this);
|
||||
//设置15秒发送超时时间
|
||||
pSock->setSendTimeOutSecond(15);
|
||||
GET_CONFIG(uint32_t,keep_alive_sec,Rtsp::kKeepAliveSecond);
|
||||
pSock->setSendTimeOutSecond(keep_alive_sec);
|
||||
//起始接收buffer缓存设置为4K,节省内存
|
||||
pSock->setReadBuffer(std::make_shared<BufferRaw>(4 * 1024));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue