title: How do you throttle the bandwidth of a socket connection in C?
body: <p>I'm writing a client-server app using BSD sockets.  It needs to run in the background, continuously transferring data, but cannot hog the bandwidth of the network interface from normal use.  Depending on the speed of the interface, I need to throttle this connection to a certain max transfer rate.</p>
  
  <p>What is the best way to achieve this, programmatically?</p>