
net.jxta.socket.package.html Maven / Gradle / Ivy
Show all versions of jxta-jxse Show documentation
The socket package provides interface ala {@link java.net.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 {@link
java.net.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 for the TCP Message Transport :
<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