cover sockets and binary sockets sockets in Jaxer do not accept requests - they are not server sockets, they are client sockets initiating requests

Connect to Sockets

Sockets are low-level networking components which can be used to implement higher-level protocols. Sockets are available at the server only and are an advanced topic.

Because Jaxer already provides API objects for making web connections and sending email, socket use is often unnecessary. Sockets could be used to implement protocols for instant messaging or for file transfers using FTP.

Sockets Types

Jaxer provides character-based sockets and binary sockets. Which type you choose will depend on the protocol you need to implement.

The examples illustrate the basic flow when using sockets:

Using a Socket

Using a Binary Socket

Bundled Example

A complete, runnable example of connecting to sockets resides in the Jaxer tools folder:

Aptana_Jaxer/jaxer/aptana/tools/hexer/

If you have Jaxer installed on your system, you can run the example.