summaryrefslogtreecommitdiffstats
path: root/docs/en/ranch/1.7/guide/transports/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/ranch/1.7/guide/transports/index.html')
-rw-r--r--docs/en/ranch/1.7/guide/transports/index.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/en/ranch/1.7/guide/transports/index.html b/docs/en/ranch/1.7/guide/transports/index.html
index f7af0741..f3c97489 100644
--- a/docs/en/ranch/1.7/guide/transports/index.html
+++ b/docs/en/ranch/1.7/guide/transports/index.html
@@ -74,7 +74,7 @@
<p>This section assumes that <code>Transport</code> is a valid transport handler (like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected socket obtained through the listener.</p>
<p>You can send data to a socket by calling the <code>Transport:send/2</code> function. The data can be given as <code>iodata()</code>, which is defined as <code>binary() | iolist()</code>. All the following calls will work:</p>
<div class="listingblock"><div class="title">Sending data to the socket</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -88,7 +88,7 @@ http://www.gnu.org/software/src-highlite -->
<p>Receiving data using passive mode requires a single function call. The first argument is the socket, and the third argument is a timeout duration before the call returns with <code>{error, timeout}</code>.</p>
<p>The second argument is the amount of data in bytes that we want to receive. The function will wait for data until it has received exactly this amount. If you are not expecting a precise size, you can specify 0 which will make this call return as soon as data was read, regardless of its size.</p>
<div class="listingblock"><div class="title">Receiving data from the socket in passive mode</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -106,7 +106,7 @@ http://www.gnu.org/software/src-highlite -->
</ul>
<p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different depending on the transport being used. To be able to properly match on them you must first call the <code>Transport:messages/0</code> function.</p>
<div class="listingblock"><div class="title">Retrieving the transport&apos;s active message identifiers</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -114,7 +114,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>To start receiving messages you will need to call the <code>Transport:setopts/2</code> function, and do so every time you want to receive data.</p>
<div class="listingblock"><div class="title">Receiving messages from the socket in active mode</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -134,7 +134,7 @@ http://www.gnu.org/software/src-highlite -->
<p>As in the previous section it is assumed <code>Transport</code> is a valid transport handler and <code>Socket</code> is a connected socket obtained through the listener.</p>
<p>To send a whole file, with name <code>Filename</code>, over a socket:</p>
<div class="listingblock"><div class="title">Sending a file by filename</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -142,7 +142,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of bytes and chunks of size <code>ChunkSize</code>:</p>
<div class="listingblock"><div class="title">Sending part of a file by filename in chunks</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -151,7 +151,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>To improve efficiency when sending multiple parts of the same file it is also possible to use a file descriptor opened in raw mode:</p>
<div class="listingblock"><div class="title">Sending a file opened in raw mode</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -161,7 +161,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_upgrading_a_tcp_socket_to_ssl">Upgrading a TCP socket to SSL</h2>
<p>A connected TCP socket can be upgraded to a SSL socket via the function <code>ranch_ssl:handshake/3</code>. The socket <strong>must</strong> be in <code>{active, false}</code> mode before telling the client that the server is ready to upgrade in order to avoid race conditions.</p>
<div class="listingblock"><div class="title">Performing a TLS handshake on a TCP socket</div>
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->