A method for forming an integral socket to a pipe made from biaxially oriented thermoplastic material, which pipe has a pipe body and is provided, at one or both ends, with an integral socket, comprising the steps of subjecting a pre-fabricated pipe from biaxially oriented thermoplastic material to a socket-forming operation using a socket-forming device, by means of which an end part, which has been heated to a suitably elevated temperature, of the pipe which has previously been produced is formed into a socket, after which the end part which has been deformed into a socket is cooled, and wherein the heated end part of the pipe, or an annular region of the said end part, is held in a substantially stationary position at one of its axial ends, and in that the other axial end of the end part is displaced in the axial direction with respect to the stationary axial end by displacement means associated with the socket-forming device, in such a manner that the end part, or the relevant annular region thereof, is lengthened in the axial direction.