Can uxp use socket to communicate with external programs?

This description is really helpful, thank you.

I see a number of posts in this forum where people installed socket.io and use the UXP plugin as a client, including for Photoshop plugins. For example, in XD in this post (can be seen in their dependencies) and in Photoshop here.

socket-io is definitely capable of doing raw TCP. Has the ability to use this module in UXP been explicitly removed? For example, I am trying to use it myself, and even though my npm install succeeds and all my node_modules files appear to be in their correct places relative to root, every single require() attempt fails, no matter what syntax.

I guess my question is "Can you install any npm package you want to get around the limitations in your bullet list, or do the limitations exist because UXP has an explicit ‘block list’ of modules to prevent you from doing certain things?