What are the antennas on snails used for?

A snail's eyes are on longish projections on its head, and the projections are called eyestalks.