comparison xml/en/docs/njs/reference.xml @ 2667:2085eb315672

Updated description of s.send in njs Reference.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 04 Mar 2021 16:38:00 +0000
parents 68c0566a375f
children e067ad74b0cd
comparison
equal deleted inserted replaced
2666:68c0566a375f 2667:2085eb315672
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">
8 8
9 <article name="Reference" 9 <article name="Reference"
10 link="/en/docs/njs/reference.html" 10 link="/en/docs/njs/reference.html"
11 lang="en" 11 lang="en"
12 rev="64"> 12 rev="65">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 <link doc="index.xml">njs</link> provides objects, methods and properties 17 <link doc="index.xml">njs</link> provides objects, methods and properties
575 </tag-desc> 575 </tag-desc>
576 576
577 <tag-name id="s_send"><literal>s.send(<value>data</value>[, 577 <tag-name id="s_send"><literal>s.send(<value>data</value>[,
578 <value>options</value>])</literal></tag-name> 578 <value>options</value>])</literal></tag-name>
579 <tag-desc> 579 <tag-desc>
580 sends the data to the client 580 adds data to the chain of data chunks that will be forwarded in
581 the forward direction:
582 in download callback to a client; in upload to an upstream server
581 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>). 583 (<link doc="changes.xml" id="njs0.2.4">0.2.4</link>).
584 The actual forwarding happens later,
585 when the all the data chunks of the current chain are processed.
586 <para>
582 The data can be a string or Buffer 587 The data can be a string or Buffer
583 (<link doc="changes.xml" id="njs0.5.0">0.5.0</link>). 588 (<link doc="changes.xml" id="njs0.5.0">0.5.0</link>).
584 The <literal>options</literal> is an object used 589 The <literal>options</literal> is an object used
585 to override nginx buffer flags derived from an incoming data chunk buffer. 590 to override nginx buffer flags derived from an incoming data chunk buffer.
586 The flags can be overridden with the following flags: 591 The flags can be overridden with the following flags:
587 <para>
588 <list type="tag"> 592 <list type="tag">
589 593
590 <tag-name><literal>last</literal></tag-name> 594 <tag-name><literal>last</literal></tag-name>
591 <tag-desc> 595 <tag-desc>
592 boolean, 596 boolean,