In suitable bounded regions immersed in vacuum, time periodic wave solutions solving a full set of electrodynamics equations can be explicitly computed. Analytical expressions are available in special cases, whereas numerical simulations are necessary in more complex situations. The attention here is given to selected three-dimensional geometries, which are topologically equivalent to a toroid, where the behavior of the waves is similar to that of fluid-dynamics vortex rings. The results show that the shape of the sections of these rings depends on the behavior of the eigenvalues of a certain elliptic differential operator. Time-periodic solutions are obtained when at least two of such eigenvalues attain the same value. The solutions obtained are discussed in view of possible applications in electromagnetic whispering galleries or plasma physics.