mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-05 06:13:23 +02:00
MINOR: hlua: add AppletTCP:try_receive()
This is the non-blocking variant for AppletTCP:receive(). It doesn't take any argument, instead it tries to read as much data as available at once. If no data is available, empty string is returned. Lua documentation was updated.
This commit is contained in:
@@ -3912,6 +3912,15 @@ AppletTCP class
|
||||
:returns: always return a string, the string can be empty if the connection is
|
||||
closed.
|
||||
|
||||
.. js:function:: AppletTCP.try_receive(applet)
|
||||
|
||||
Reads available data from the TCP stream and returns immediately. Returns a
|
||||
string containing read bytes that may possibly be empty if no bytes are
|
||||
available at that time.
|
||||
|
||||
:param class_AppletTCP applet: An :ref:`applettcp_class`
|
||||
:returns: always return a string, the string can be empty.
|
||||
|
||||
.. js:function:: AppletTCP.send(appletmsg)
|
||||
|
||||
Send the message on the stream.
|
||||
|
||||
Reference in New Issue
Block a user