FINCLOSE and NOFINCLOSE (JANUS DEFINE parameters): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (add displaytitle)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:FINCLOSE | NOFINCLOSE}}
{{DISPLAYTITLE:FINCLOSE and NOFINCLOSE}}
<span class="pageSubtitle"><section begin="desc" />Sockets close-connection characteristics<section end="desc" /></span>
<span class="pageSubtitle">Sockets close-connection characteristics</span>


<var>FINCLOSE</var> is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port. See the [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].
<var>FINCLOSE</var> and <var>NOFINCLOSE</var> are parameters on <var>[[JANUS DEFINE]]</var>, which defines and sets characteristics of a Janus port.  


This parameter affects how ''[[Janus Sockets]]'' applications respond to a closed connection. If the remote host closes the connection, even if it does so "cleanly" (that is with FIN rather than RESET), ''Janus Sockets'' closes the connection immediately. This is useful in situations where FIN is as good as RESET for rendering a connection unusable, and where it's important to know that a FIN has been sent to avoid wasted processing or even a hung connection.  
These parameters affect how <var class="product">[[Janus Sockets]]</var> applications respond to a closed connection. If the remote host closes the connection, even if it does so "cleanly" (that is with FIN rather than RESET), <var class="product">Janus Sockets</var> closes the connection immediately. This is useful in situations where FIN is as good as RESET for rendering a connection unusable, and where it's important to know that a FIN has been sent to avoid wasted processing or even a hung connection.  


If <var>FINCLOSE</var> is not specified, or if <var>NOFINCLOSE</var> is specified, a ''Janus Sockets'' thread remains in-use and does not recognize a FIN indicator sent by a remote partner until the ''Janus Sockets'' application tries to receive data on the connection.  
If <var>FINCLOSE</var> is not specified, or if <var>NOFINCLOSE</var> is specified, a <var class="product">Janus Sockets</var> thread remains in-use and does not recognize a FIN indicator sent by a remote partner until the <var class="product">Janus Sockets</var> application tries to receive data on the connection.  


A situation where <var>FINCLOSE</var> processing is useful is a ''Janus Sockets'' application communicating with a web server that is using a keep-alive facility (multiple requests over the same TCP/IP connection). The web server could close the connection between any pair of requests with a FIN. Without <var>FINCLOSE</var> processing, a Janus thread that connected to the web server and received such a FIN would remain in use until the ''Janus Sockets'' application tried to receive data on the connection and then noticed the closed connection.  
A situation where <var>FINCLOSE</var> processing is useful is a <var class="product">Janus Sockets</var> application communicating with a web server that is using a keep-alive facility (multiple requests over the same TCP/IP connection). The web server could close the connection between any pair of requests with a FIN. Without <var>FINCLOSE</var> processing, a Janus thread that connected to the web server and received such a FIN would remain in use until the <var class="product">Janus Sockets</var> application tried to receive data on the connection and then noticed the closed connection.  


If not set on the port definition, you can make <var>FINCLOSE</var> or <var>NOFINCLOSE</var> specific to a <var>[[$Sock_Conn]]</var> call or to a <var>[[Socket class|Socket]]</var> object <var>[[New (Socket constructor)|New]]</var> constructor.  
If not set on the port definition, you can make <var>FINCLOSE</var> or <var>NOFINCLOSE</var> specific to a <var>[[$Sock_Conn]]</var> call or to a <var>[[Socket class|Socket]]</var> object <var>[[New (Socket constructor)|New]]</var> constructor.  


The <var>FINCLOSE</var> and <var>NOFINCLOSE</var> parameters are valid only for CLSOCK and SRVSOCK ports.
The <var>FINCLOSE</var> and <var>NOFINCLOSE</var> parameters are valid only for <var>[[JANUS DEFINE#type|CLSOCK]]</var> and <var>[[JANUS DEFINE#type|SRVSOCK]]</var> ports.


==References==
==See also==
<ul>
<li>[[List of Janus commands]]
<li>[[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]]
</ul>


See: [[List of Janus commands]] | [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].


[[Category:JANUS DEFINE parameters|FINCLOSE]]
[[Category:JANUS DEFINE parameters|FINCLOSE]]

Latest revision as of 17:57, 8 June 2016

Sockets close-connection characteristics

FINCLOSE and NOFINCLOSE are parameters on JANUS DEFINE, which defines and sets characteristics of a Janus port.

These parameters affect how Janus Sockets applications respond to a closed connection. If the remote host closes the connection, even if it does so "cleanly" (that is with FIN rather than RESET), Janus Sockets closes the connection immediately. This is useful in situations where FIN is as good as RESET for rendering a connection unusable, and where it's important to know that a FIN has been sent to avoid wasted processing or even a hung connection.

If FINCLOSE is not specified, or if NOFINCLOSE is specified, a Janus Sockets thread remains in-use and does not recognize a FIN indicator sent by a remote partner until the Janus Sockets application tries to receive data on the connection.

A situation where FINCLOSE processing is useful is a Janus Sockets application communicating with a web server that is using a keep-alive facility (multiple requests over the same TCP/IP connection). The web server could close the connection between any pair of requests with a FIN. Without FINCLOSE processing, a Janus thread that connected to the web server and received such a FIN would remain in use until the Janus Sockets application tried to receive data on the connection and then noticed the closed connection.

If not set on the port definition, you can make FINCLOSE or NOFINCLOSE specific to a $Sock_Conn call or to a Socket object New constructor.

The FINCLOSE and NOFINCLOSE parameters are valid only for CLSOCK and SRVSOCK ports.

See also