Chapter 18. The JXTA Standard Transport Bindings Specification
TCP/IP Transport Binding
The following section describes the transport binding for the JXTA protocols over TCP/IP. The document describes the message wire format of JXTA endpoint messages over a TCP/IP socket connection.
TCP/IP Wire Format
This section defines the TCP/IP message wire format. Each TCP/IP message is composed of:
Header
Body
Header
The format of the header is:
|
Type |
Src IP |
Src Port |
Size |
Option |
Unused |
The header fields are as follows:
- Type
One byte. The byte info is used to either unicast or multicast the request.
1 = This is a propagate message.
2 = This is a unicast message.
3 = This for ACK (unused).
4 = This is for NACK (unused).
- Src IP
Four bytes. (IP addresses are in the IPv4 format.)
- Src Port
Two bytes (network byte order representation). The port is present since each peer may decide to bind its transport service to a specific port number. The TCP binding does not require that a specific port be used.
- Size
Four-byte body, not counting the header (network byte order representation).
- Option
One-byte option. These options are intended to be used to specify the kind of socket connection (uni- or bidirectional) in use:
HANDCHECK = 1 not implemented yet (bidirectional)
NONBLOCKING = 2 (unidirectional transfer)
- Unused
Four bytes.
Body
The format of the body is described in Chapter 16 and is represented as a byte array.
Connection States
The TCP/IP binding is stateless and does not require any states to be maintained. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access