moved incoming vonnection handling to a new function
forced delay of at least 25ms between loops, to keep CPU use down while idle
comment describing the new variable