socket: coalesce writes