From 8459bebceb9533948193774371cbd9fd571b78ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 16 Oct 2019 09:48:31 +0200 Subject: Cowboy 2.7.0 --- .../en/ranch/1.7/manual/ranch_transport/index.html | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'docs/en/ranch/1.7/manual/ranch_transport/index.html') diff --git a/docs/en/ranch/1.7/manual/ranch_transport/index.html b/docs/en/ranch/1.7/manual/ranch_transport/index.html index 4573297e..fa7d682d 100644 --- a/docs/en/ranch/1.7/manual/ranch_transport/index.html +++ b/docs/en/ranch/1.7/manual/ranch_transport/index.html @@ -69,7 +69,7 @@

Callbacks

Ranch transports implement the following interface:

accept

-
@@ -79,7 +79,7 @@ http://www.gnu.org/software/src-highlite -->

Use the listening socket returned by listen/1 to accept a new connection. The timeout is specified in milliseconds.

close

-
@@ -87,7 +87,7 @@ http://www.gnu.org/software/src-highlite -->

Close the socket.

controlling_process

-
@@ -96,7 +96,7 @@ http://www.gnu.org/software/src-highlite -->

Assign a new controlling process to the socket. The controlling process is the process that is linked to and receives messages from the socket.

getopts

-
@@ -105,7 +105,7 @@ http://www.gnu.org/software/src-highlite -->

Get one or more options for the socket.

getstat

-
@@ -113,7 +113,7 @@ http://www.gnu.org/software/src-highlite --> -> {ok, SockStatValues :: any()} | {error, atom()}

Get all statistics for the socket.

-
@@ -122,7 +122,7 @@ http://www.gnu.org/software/src-highlite -->

Get one or more statistic options for the socket.

handshake

-
@@ -135,7 +135,7 @@ http://www.gnu.org/software/src-highlite -->

This function will be called by connection processes before performing any socket operation. It allows transports that require extra initialization to perform their task and return a socket that is ready to use.

This function may also be used to upgrade a connection from a transport to another depending on the capabilities of the transports. For example a ranch_tcp socket may be upgraded to a ranch_ssl one using this function.

listen

-
@@ -145,7 +145,7 @@ http://www.gnu.org/software/src-highlite -->

Create a socket that listens on the given port.

The port may not be specified or may be set to 0, which means a random available port number will be chosen.

messages

-
@@ -156,7 +156,7 @@ http://www.gnu.org/software/src-highlite -->

Return the tuple keys for the messages sent by the socket.

name

-
@@ -164,7 +164,7 @@ http://www.gnu.org/software/src-highlite -->

Return the name of the transport.

peername

-
@@ -174,7 +174,7 @@ http://www.gnu.org/software/src-highlite -->

Return the address and port number for the other end of the connection.

recv

-
@@ -189,7 +189,7 @@ http://www.gnu.org/software/src-highlite -->

A length of 0 will return the data available on the socket as soon as possible, regardless of length.

While it is possible to use the timeout value infinity, it is highly discouraged as it could cause your process to get stuck waiting for data that will never come. This may happen when a socket becomes half-open due to a crash of the remote endpoint. Wi-Fi going down is another common culprit.

secure

-
@@ -197,7 +197,7 @@ http://www.gnu.org/software/src-highlite -->

Return whether the transport can be used for secure connections.

send

-
@@ -206,7 +206,7 @@ http://www.gnu.org/software/src-highlite -->

Send a packet on the socket.

sendfile

-
@@ -227,7 +227,7 @@ http://www.gnu.org/software/src-highlite -->

The file may be sent full or in parts, and may be specified by its filename or by an already open file descriptor.

Transports that manipulate TCP directly may use the file:sendfile/2,4,5 function, which calls the sendfile syscall where applicable (on Linux, for example). Other transports can use the sendfile/6 function exported from this module.

setopts

-
@@ -236,7 +236,7 @@ http://www.gnu.org/software/src-highlite -->

Set one or more options for the socket.

shutdown

-
@@ -246,7 +246,7 @@ http://www.gnu.org/software/src-highlite -->

Close the socket for reading and/or writing.

sockname

-
@@ -262,7 +262,7 @@ http://www.gnu.org/software/src-highlite -->

Types

sendfile_opts()

-
@@ -274,7 +274,7 @@ http://www.gnu.org/software/src-highlite -->

socket()

-
-- cgit v1.2.3