• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

datagram socket performance problem

rob adobadob
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have been writing a video streaming server, and i have found that it does not perform anywhere near how it should (with available disk and network bandwidth). I have split the program down, and discovered that sending UDP packets appears to be running really slowly. Here is an example of the code i am using (sending blank packets for speed).

it sends 150 megs of data in about 30 seconds = 5 meg/sec which is no where near the available bandwidth (gigabit lan).

So, i thought maybe the NIO packages are the solution, but i get similar performance using the datagram channel and byte buffers with this code:

what am i doing wrong? is there a better way of sending data over a network? what I am essentially doing is trying to read directly from a file on the disk and send it straight over the network as fast as possible. Any help much appreciated.


Robert Clarkson
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic