diff --git a/srt/SrtSession.cpp b/srt/SrtSession.cpp index ed7f4547..47b0b11f 100644 --- a/srt/SrtSession.cpp +++ b/srt/SrtSession.cpp @@ -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(); diff --git a/srt/SrtSession.hpp b/srt/SrtSession.hpp index 9478f1b9..401aae3c 100644 --- a/srt/SrtSession.hpp +++ b/srt/SrtSession.hpp @@ -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: