Switching plugs and sockets