I tried to using udt for realtime pvp game. And I found it's not good at it.
Bench mark of udt with epoll. (SOCK_DGRAM and unblock socket)
This bench mark is for the situation of realtime pvp game. For example, the multiplayer first person shooting game.
The requirement of realtime pvp game is packet is small and frequently. It wants a minimal delay. And the worst delay should be not so worst.
The tests run server on a server on internet. The Bandwidth of internet is 5M.
And run client_epoll or client on home computer var wifi. The Bandwidth of ADSL is 10M.
Both Bandwidth is much bigger than we need (10 times more). And I use iptraf to verify it.
The client send 500 bytes data as one packet in every 50 milliseconds. Or 50 bytes for another test.
The server sendback the data after receiving the packet.
server is a udt epoll server.
./server/server 0.0.0.0 23456 >/dev/null
client_epoll is a client using udt epoll.
./client_epoll/client_epoll 20003 120.26.200.xxx 23456 500 2>>./error.log
client is a client using udt unblock socket by checking read/write frequently.
./client/client 20003 120.26.200.xxx 23456 500 2>>./error.log
The conclusion of this bench mark test:
The udt epoll is not good at realtime pvp game currently.
The latency is perfect at normal.
But the udt will fall into a badly situation if there is a small lag.
The udt with epoll has good performance if sending 500 bytes in every 500 milliseconds. So you can use udt with epoll for some other situation.
You can see the whole bench mark at https://github.com/libinzhangyuan/udt_patch_for_epoll/blob/master/bench_mark.md
The udt verison is 4.10 with the patch for fix the bug: epoll_wait always return with the situation of all socket need read.
http://sourceforge.net/p/udt/discussion/393036/thread/56c105fe/
http://sourceforge.net/p/udt/discussion/852996/thread/88d8bee5/