How to use the net package in Electron Node. js in the Web Desktop game developed with CocosCreator?

I want to develop a cross-platform board game using CocosCreator, but I don’t want to use WebSocket, I want to be able to use sockets.I know that Node. js can use the Net package, but I haven’t found a good way to use the net package directly or indirectly in games. Can anyone give me a good idea?

You are welcome to discuss this implementation with me by email.

cattledrinkredwine@gmail.com

Develop game in HaXe.

HaXe can also create an Electron container.