@@ -272,7 +272,7 @@ the function invocations will look like ``sock:function_name(...)``.
272
272
Reading goes on until ``limit `` bytes have been read, or a delimiter
273
273
has been read, or a timeout has expired.
274
274
275
- :param integer limit: maximum number of bytes to read for
275
+ :param integer limit: maximum number of bytes to read, for
276
276
example 50 means "stop after 50 bytes"
277
277
:param string delimiter: separator for example
278
278
'?' means "stop after a question mark"
@@ -289,8 +289,17 @@ the function invocations will look like ``sock:function_name(...)``.
289
289
290
290
.. method :: sysread(size)
291
291
292
- Return all available data from the socket buffer if non-blocking.
293
- Rarely used. For details see `this description `_.
292
+ Return data from the socket buffer if non-blocking.
293
+ In case the socket is blocking, ``sysread() `` can block the calling process.
294
+ Rarely used. For details, see also
295
+ `this description <https://github.com/tarantool/tarantool/wiki/sockets%201.6 >`_.
296
+
297
+ :param integer size: maximum number of bytes to read, for
298
+ example 50 means "stop after 50 bytes"
299
+
300
+ :return: an empty string if there is nothing more to read, or a nil
301
+ value if error, or a string up to ``size `` bytes long.
302
+ :rtype: string
294
303
295
304
.. _socket-bind :
296
305
@@ -540,10 +549,8 @@ the function invocations will look like ``sock:function_name(...)``.
540
549
541
550
Example: ``socket.iowait(sock:fd(), 'r', 1.11) ``
542
551
543
- .. _this description : https://github.com/tarantool/tarantool/wiki/sockets%201.6
544
-
545
552
=================================================
546
- Example
553
+ Examples
547
554
=================================================
548
555
549
556
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments