Posted by enygma2002
on April 29, 2009 at 4:44 AM PDT
This is not very clear.
The jxta docs say that relays use HTTP to relay messages to firewalled/NATed peers. This implies that you need to use HTTP communication and that if you turn it off, you will not be able to use Relay peers.
In practice though, I am using relay peers through TCP *only* (HTTP disabled) and it works great. I have also set the tcp port to 80 to make sure the peers use an opened outgoing port.
It is also unclear why there is a separation between TCP (Network protocol) and HTTP (Application protocol, built on top of TCP).
Logically, if you were to disable TCP, all your communication would also be disable. Instead, jxta treats them as if they were both network protocols and HTTP can run independently from TCP. This is confusing.
So, from what I can assume, TCP communication (in jxta's world) means a binary protocol used over TCP. HTTP communication would mean the same data being wrapped in text data, specific to the HTTP protocol.
The HTTP option would be, indeed, useful to a limited (IMO) set of peers which have protocol level filtering on their network and for which it would not be enough just to use port 80.
So, back to the original problem, it should be made official that the Relay peers do NOT use HTTP by default. It is recommended that they run on port 80 and, if required, that they use HTTP wrapping (enable HTTP communication).
P.S.: In this post, enabling/disabling TCP/HTTP means using NetworkConfiguratior.enableTcp/Http(true/false).