发送超时时间可配置

This commit is contained in:
xiongziliang
2019-05-30 10:41:25 +08:00
parent 5304d81306
commit 0c460b397d
3 changed files with 6 additions and 6 deletions

View File

@@ -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));
}