문제

I try to make rtsp server in linux, I consider that server choice single or multiple thread automatically.

As you know, RTSP has lots of data packets between server and client. (video, music like real-time data)

So, I think epolling is not good choice. Because events occured every time in this case.

Besides, I heard it is not good that one socket per one thread. Due to the same reason, this is not good choice too.

I saw sample codes about that, no one make epolling or multi socket in one thread. (It may be just sample code)

Is it right? rtsp server using epolling is no meaningless?

도움이 되었습니까?

해결책

It depends on many things, such as how many total clients you need to serve? If you are doing a home server and going to serve max 10 clients simultaneously, you will be better using one thread per client. With 50 clients it may still be the case, although poll is more likely a better choice. With 10,000 clients you'd probably be better using epoll in edge triggering mode.

I've just posted an article comparing different polling methods: http://www.ulduzsoft.com/2014/01/select-poll-epoll-practical-difference-for-system-architects/ - check it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top