Name
poll
Description
The
poll command instructs the relay server to respond
with a JXTA message destined for the client. If there is not a
pending message for the client, the relay server should respond immediately.
Request
The following query string variable must be set by the client:
-
leaseId Must be set to the lease ID of the lease
Response
If
no message is queued for the client within this time, a response with
a Content-Length of 0 will be
sent. Otherwise, exactly one JXTA message will be sent in the
response body. The Content-Length
must be set to the length of the JXTA message.
The Content-Type
must
be set to application/octet-stream. If
the lease ID is not valid (e.g., the lease is expired), the response
must be 400.
Example
The following listing shows an example
HTTP POST request body for the poll
command:
command=poll&leaseId=1234
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