@antonio-mestre the net module implements just a raw TCP socket. The secure web socket protocol uses the Websocket protocol on top of the TLS protocol on top of the TCP protocol.
Right now our sdk unfortunately does not include modules for TLS (but we have https) nor Websocket, so you would have to implement that yourself if you want to use wss, using the net module in the bottom for TCP.