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>
|
||||
passing the same HELLO handshake as above
|
||||
</li><li>
|
||||
sending the connection command :
|
||||
sending the STREAM CONNECT command:
|
||||
</li></ul>
|
||||
|
||||
<pre>
|
||||
@@ -340,7 +340,7 @@ depending on signature type.
|
||||
|
||||
</p><p>
|
||||
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
|
||||
current socket is forwarded from and to the connected I2P destination
|
||||
peer.
|
||||
@@ -385,7 +385,7 @@ opening a new socket with the SAM bridge
|
||||
</li><li>
|
||||
passing the same HELLO handshake as above
|
||||
</li><li>
|
||||
sending the accept command :
|
||||
sending the STREAM ACCEPT command:
|
||||
</li></ul>
|
||||
|
||||
<pre>
|
||||
@@ -399,7 +399,18 @@ This makes the session ${nickname} listen for one incoming
|
||||
connection request from the I2P network.
|
||||
|
||||
</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>
|
||||
<- STREAM STATUS
|
||||
@@ -424,7 +435,7 @@ arrives, the SAM bridge accepts it and :
|
||||
|
||||
</p><p>
|
||||
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
|
||||
peer.
|
||||
|
||||
@@ -439,7 +450,7 @@ I2P destination peer, until one of the peer closes the socket.
|
||||
<h3>SAM Virtual Streams : FORWARD</h3>
|
||||
<p>
|
||||
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>
|
||||
open a new socket with the SAM bridge
|
||||
</li><li>
|
||||
@@ -461,7 +472,12 @@ This makes the session ${nickname} listen for incoming
|
||||
connection requests from the I2P network.
|
||||
|
||||
</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>
|
||||
<- 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).
|
||||
|
||||
</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:
|
||||
|
||||
<p>
|
||||
@@ -553,7 +569,7 @@ following format :
|
||||
|
||||
</p><p>
|
||||
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>
|
||||
For an alternate method of sending repliable datagrams, see <a href="#dgsend">DATAGRAM SEND</a>.
|
||||
|
Reference in New Issue
Block a user