toggle listeners of websockets