for srt set recv buf

This commit is contained in:
xiongguangjie 2022-06-03 18:05:24 +08:00
parent ddc5b59a65
commit 7038924c6f
2 changed files with 4 additions and 2 deletions

View File

@ -47,7 +47,9 @@ EventPoller::Ptr SrtSession::queryPoller(const Buffer::Ptr &buffer) {
}
return nullptr;
}
void SrtSession::attachServer(const toolkit::Server &server){
SockUtil::setRecvBuf(getSock()->rawFD(),1024 * 1024);
}
void SrtSession::onRecv(const Buffer::Ptr &buffer) {
uint8_t* data = (uint8_t*)buffer->data();
size_t size = buffer->size();

View File

@ -16,7 +16,7 @@ public:
void onRecv(const Buffer::Ptr &) override;
void onError(const SockException &err) override;
void onManager() override;
void attachServer(const toolkit::Server &server) override;
static EventPoller::Ptr queryPoller(const Buffer::Ptr &buffer);
private: