Sends buffer over lan with multiples tries until the whole buffer is sent