forked from I2P_Developers/i2p.www
SAM: Fix docs for STREAM ACCEPT when SILENT=true
Clarify that FORWARD works differently than ACCEPT and CONNECT when SILENT=true cleanups
This commit is contained in:
@@ -319,7 +319,7 @@ opening a new socket with the SAM bridge
|
|||||||
</li><li>
|
</li><li>
|
||||||
passing the same HELLO handshake as above
|
passing the same HELLO handshake as above
|
||||||
</li><li>
|
</li><li>
|
||||||
sending the connection command :
|
sending the STREAM CONNECT command:
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@@ -340,7 +340,7 @@ depending on signature type.
|
|||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
If SILENT=true is passed, the SAM bridge won't issue any other message
|
If SILENT=true is passed, the SAM bridge won't issue any other message
|
||||||
on the socket : if the connection fails, the socket will be closed.
|
on the socket. If the connection fails, the socket will be closed.
|
||||||
If the connection succeeds, all remaining data passing through the
|
If the connection succeeds, all remaining data passing through the
|
||||||
current socket is forwarded from and to the connected I2P destination
|
current socket is forwarded from and to the connected I2P destination
|
||||||
peer.
|
peer.
|
||||||
@@ -385,7 +385,7 @@ opening a new socket with the SAM bridge
|
|||||||
</li><li>
|
</li><li>
|
||||||
passing the same HELLO handshake as above
|
passing the same HELLO handshake as above
|
||||||
</li><li>
|
</li><li>
|
||||||
sending the accept command :
|
sending the STREAM ACCEPT command:
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@@ -399,7 +399,18 @@ This makes the session ${nickname} listen for one incoming
|
|||||||
connection request from the I2P network.
|
connection request from the I2P network.
|
||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
The SAM bridge answers with :
|
If SILENT=true is passed, the SAM bridge won't issue any other message
|
||||||
|
on the socket. If the accept fails, the socket will be closed.
|
||||||
|
If the accept succeeds, all remaining data passing through the
|
||||||
|
current socket is forwarded from and to the connected I2P destination
|
||||||
|
peer.
|
||||||
|
For reliability, and to receive the destination for incoming connections,
|
||||||
|
SILENT=false is recommended.
|
||||||
|
|
||||||
|
|
||||||
|
</p><p>
|
||||||
|
If SILENT=false, which is the default value,
|
||||||
|
the SAM bridge answers with:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<- STREAM STATUS
|
<- STREAM STATUS
|
||||||
@@ -424,7 +435,7 @@ arrives, the SAM bridge accepts it and :
|
|||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
If SILENT=true was passed, the SAM bridge won't issue any other message
|
If SILENT=true was passed, the SAM bridge won't issue any other message
|
||||||
on the client socket : all remaining data passing through the
|
on the client socket. All remaining data passing through the
|
||||||
current socket is forwarded from and to the connected I2P destination
|
current socket is forwarded from and to the connected I2P destination
|
||||||
peer.
|
peer.
|
||||||
|
|
||||||
@@ -439,7 +450,7 @@ I2P destination peer, until one of the peer closes the socket.
|
|||||||
<h3>SAM Virtual Streams : FORWARD</h3>
|
<h3>SAM Virtual Streams : FORWARD</h3>
|
||||||
<p>
|
<p>
|
||||||
A client can use a regular socket server and wait for connection requests
|
A client can use a regular socket server and wait for connection requests
|
||||||
coming from I2P. For that, the client has to :
|
coming from I2P. For that, the client must:
|
||||||
<ul><li>
|
<ul><li>
|
||||||
open a new socket with the SAM bridge
|
open a new socket with the SAM bridge
|
||||||
</li><li>
|
</li><li>
|
||||||
@@ -461,7 +472,12 @@ This makes the session ${nickname} listen for incoming
|
|||||||
connection requests from the I2P network.
|
connection requests from the I2P network.
|
||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
The SAM bridge answers with :
|
SILENT defaults to false.
|
||||||
|
Whether SILENT is true or false,
|
||||||
|
the SAM bridge always answers with a STREAM STATUS message.
|
||||||
|
Note that this is a different behavior from STREAM ACCEPT and STREAM CONNECT
|
||||||
|
when SILENT=true.
|
||||||
|
The STREAM STATUS message is:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<- STREAM STATUS
|
<- STREAM STATUS
|
||||||
@@ -532,7 +548,7 @@ After establishing a SAM session with STYLE=DATAGRAM, the client can
|
|||||||
send datagrams through SAM's UDP port (7655).
|
send datagrams through SAM's UDP port (7655).
|
||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
The first line of a datagram sent through this port has to be in the
|
The first line of a datagram sent through this port must be in the
|
||||||
following format:
|
following format:
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -553,7 +569,7 @@ following format :
|
|||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
The first line will be discarded by SAM before sending the remaining
|
The first line will be discarded by SAM before sending the remaining
|
||||||
of the message to the specified destination.
|
data of the message to the specified destination.
|
||||||
|
|
||||||
</p><p>
|
</p><p>
|
||||||
For an alternate method of sending repliable datagrams, see <a href="#dgsend">DATAGRAM SEND</a>.
|
For an alternate method of sending repliable datagrams, see <a href="#dgsend">DATAGRAM SEND</a>.
|
||||||
|
Reference in New Issue
Block a user