title: C# How to split UDP packets?
body: <p>I'm using the UdpClient class to send packets.</p>
  
  <p>It seems that there's a per-packet size limit, since big packets never reach their destination. I tried to lower the packet size, which allows the packets to reach their destination. I read somewhere that the "standard" packet size limit is 512 bytes.</p>
  
  <p>But I still need to send objects that are way larger than 512 bytes.</p>
  
  <p><strong>So my question is: is there a built-in way in .NET to split up a byte array into smaller packets.</strong> Obviously, I need to reassemble the split packets afterwards, too.</p>
  
  <p>I saw the SendFile method in the Socket class, which I guess should be able to automatically split up big files. But the method doesn't allow byte array input (only file name). So it would only work for sending data that is stored on the hard drive, not for in-memory data.</p>