TCPSocket

Orbited provides a socket interface, using an Orbited daemon to proxy TCP streams to the web browser. This allows clients written in JavaScript to connect to networks servers and send and receive data.

Using TCPSocket in Orbited 0.5

Orbited 0.5 serves clients for several network protocols from the /static/protocols directory. You can implement your own network client by using TCPSocket interface directly.

Add the following script tags to your html file:

<script src="http://yourdomain:8000/static/TCPSocket.js"></script>

Orbited must be running on a subdomain of your web server's location, but you can also run orbited on the same ip/domain but a different port. If you are using Orbited in a cross-port setup, include this script tag:

ORBITED_PORT = 8000

If you are using Orbited on a different subdomain:

ORBITED_DOMAIN = yoursubdomain.example.com

TCPSocket API

Methods

Callbacks