title: C/C++ - How to send a video file in "packets" over a UDP socket?
body: <p>For a project, I'm looking to simulate a communication protocol. I plan to add in my own simulated packet loss and what not. However, I'd like to build this simulation on top of a UDP socket. So that the UDP socket will actually be the one sending and receiving the files, and then I can just simulate my own packet loss and protocol on top of that. What I'm not sure how to do is take an example (video) file and break it down into packets, which I then send over the UDP socket, then recombine them afterward to get the video back out. Can someone walk me through what I need to do that? Possibly an example? Thanks!</p>