Widgets websockets connection

Could I connect to websockets using background script in figma? I didn’t found any tutorial and information about connection. My websocket connection in script doesn’t work.