1. An electrical socket device, comprising:a receptacle provided with at least one electrical socket configured to receive a connection portion of an electrical plug, the receptacle defining at least one inner cavity and having on one of the surfaces thereof at least one through hole leading into the inner cavity, and at least one groove extending circumferentially with regard to the electrical socket, and comprising an opening leading into the inner cavity, the groove being intended to receive a peripheral flange of the electrical plug; and
at least one mechanism for locking and unlocking the electrical plug in position, the locking and unlocking mechanism including:
a mount arranged in the inner cavity of the receptacle;
a flexible part mounted on the mount, said flexible part comprising an end portion extending through the opening, the end portion being provided, at the free end thereof, with a member for immobilizing the electrical plug in translation, the immobilizing member extending into the groove and being capable of retracting and of retaining, by means of bracing, the peripheral flange of the electrical plug when the peripheral flange is received in the groove; and
a push member mounted on the mount, and extending through the through hole, the push member including an actuation member arranged in the inner cavity opposite the end portion of the flexible part, the push member being mounted so as to be movable in translation relative to the mount along an axis between:
a first position of rest, in which the actuation member is distant from the immobilizing member of the end portion extending into the groove, retaining the peripheral flange of the electrical plug (4) when the peripheral flange is received in the groove; and
a second position of abutment on the push member, in which the actuation member bears on the end portion of the flexible part which is retracted into the inner cavity of the receptacle so as to distance the member for immobilizing the electrical plug in order to release the electrical plug,
wherein the mount forms a post, the end portion of the flexible part extending forward of the post, toward the electrical socket, and in that the push member is formed from a monobloc tube capable of being engaged on the post.