The X-ray source RX J0648.0-4418 is the only confirmed binary system in which a compact object, most likely a massive white dwarf, accretes from a hot subdwarf companion, the bright sdO star HD 49798. The X-ray emission from this system is characterized by two periodic modulations caused by an eclipse, at the orbital period of 1.55 d, and by the rotation of the compact object with a spin period of 13.2 s. In 2011 we obtained six short XMM-Newton observations centered at orbital phase 0.75, in order to study the system during the eclipse, and spaced at increasingly long time intervals in order to obtain an accurate measure of the spin-period evolution through phase-connected timing. The duration of the eclipse ingress and egress, 500 s, indicates the presence of an X-ray emitting region with dimensions of the order of a few 10^4 km, surrounding the pulsar and probably due to scattering in the companions wind. We derived an upper limit on the spin-period derivative |Pdot|<6x10^-15 s/s, more than two orders of magnitude smaller than the previously available value. Significant X-ray emission is detected also during the 1.2 hours-long eclipse, with a luminosity of about 3x10^30 erg/s. The eclipse spectrum shows prominent emission lines of H- and He-like nitrogen, an overabundant element in HD 49798. These findings support the suggestion that the X-ray emission observed during the eclipse originates in HD 49798 and that the processes responsible for X-ray emission in the stellar winds of massive O stars are also at work in the much weaker winds of hot subdwarfs.