I want to open a socket connection (outgoing, not listen on an nsIServerSocket) from within a Firefox add-on in JavaScript. The connection should be TCP to localhost on a specified port, and will be used to communicate with another process running on the machine.
How can I open such a client socket? I found the API documentation for interfaces like nsISocketTransport on developer.mozilla.org, but that still doesn't help me put the pieces together. It doesn't even mention that the socket can be for TCP there, either, so I'm not even 100% sure this is the interface I need. All I could find so far is more about nsIServerSocket. Note: I'm not using the add-on SDK, and work on a bootstrapped add-on directly.