A method of forming a socket at the end of a pipe made of thermoplastic material, comprising the steps of:
- taking a pipe made of thermoplastic material having an end heated to a plastically deformable state;
- forming a socket with the material of the heated end of the pipe;
- taking process air arriving from a compressed air source and subjecting the process air taken in this way to a treatment step comprising at least one cooling sub-step;
- cooling the material of the end of the pipe at least by means of a process air flow exiting the treatment step;
- wherein, during the cooling sub-step, the process air is conveyed and made to pass inside an evaporator of a refrigerating machine with an operating cycle operating on a refrigerant recirculating in a respective closed circuit of the refrigerating machine comprising the evaporator, resulting in transfer of heat from the process air to the refrigerant inside the evaporator;
- wherein during the process air treatment step:
- the process air taken from the compressed air source is first subjected to a pre-cooling sub-step and then to the cooling sub-step;
- during the pre-cooling sub-step the process air is conveyed and made to pass in a first heat exchanger, in which the process air transfers heat to a heat exchange liquid cooled by a refrigerating section, the heat exchange liquid recirculating in a respective closed circuit comprising the first heat exchanger.