Project JXTA

Package net.jxta.socket

The socket package provides interface ala Socket over JXTA pipes.

See:
          Description

Class Summary
JxtaMulticastSocket The JxtaMulticastSocket class is useful for sending and receiving JXTA multicast packets.
JxtaServerSocket JxtaServerSocket is a bi-directional Pipe that behaves very much like ServerSocket.
JxtaSocket JxtaSocket is a bi-directional Pipe, that behaves very much like a Socket, it creates an InputPipe and listens for pipe connection request.
JxtaSocketOutputStream This class implements a buffered output stream.
 

Package net.jxta.socket Description

The socket package provides interface ala Socket over JXTA pipes. Since the PipeService provides uni-directional, and unreliable communication channels, the JxtaSocket employs it's own protocol over pipes to establish bi-directional connections for every request. In addition the JxtaSocket also employs the reliability library to ensure reliable delivery of data.  Another feature of JxtaSockets is chunking, which relieves applications from having to worry about mtu size, just remember to invoke flush at the end of data transmission


JxtaSocket defines the following message elements employed during the life cycle of a JxtaSocket :

<> <Cred>Credentials to determine trust</Cred>
<><reqPipe>requestor's pipe advertisement</reqPipe>
<remPipe>Remote pipe advertisement</remPipe>
<reqPeer>Remote peer advertisement</remPeer>
<stream>true|false == reliable|or not</stream>
<close>close request</close>
<closeACK>ack close request</closeACK>
<data>data</data>

The socket package also provides interface ala MulticastSocket over propagated pipes.  Keep in mind JxtaMulticastSocket does not provide chunking nor reliability at this time, therefore one must consider configuration parameters such as the multicast datagram size defined in the PlatformConfig :

<MulticastSize>
    16384
</MulticastSize>

As well as any other mtu size imposed by the JXTA Platform, or the operating system.

For examples on how to utilize the net.jxta.socket see the online tutorials on JxtaSocket, and JxtaMulticastSocket available at http://www.jxta.org/Tutorials.html



JXTA J2SE