Communicate with Win Socket?

Is it possible to create an app that can send data to a raw win socket? For example, enter an SSID and Key, then connect to a local network and communicate with a server at a given IP address and port?

This looks like it could work:
https://javascript.info/websocket

Thanks!! I’ll give that a try.