Procházet zdrojové kódy

tcpops: docs for tcp_con_alive()

Daniel-Constantin Mierla před 5 měsíci
rodič
revize
41a48b519c
1 změnil soubory, kde provedl 30 přidání a 0 odebrání
  1. 30 0
      src/modules/tcpops/doc/functions.xml

+ 30 - 0
src/modules/tcpops/doc/functions.xml

@@ -40,6 +40,36 @@
 	if(!tcp_conid_alive("$var(conid)")) {
 		xlog("L_ERR", "Connection $conid can no longer be used\n");
 	}
+...
+			]]></programlisting>
+		</example>
+	</section>
+	<section id="tcpops.f.tcp_con_alive">
+		<title>
+			<function>tcp_con_alive(hostport)</function>
+		</title>
+		<para>
+			Check the connection based on target host:port.
+		</para>
+		<para>Meaning of the parameters is as follows:</para>
+		<itemizedlist>
+			<listitem>
+				<para><emphasis>hostport</emphasis> - target "host:port" address,
+				the port can be omitted (default to 5060) and the parameter can
+				contain variables.
+				</para>
+			</listitem>
+		</itemizedlist>
+		<para>Return values:</para>
+		<para>1: connection was found</para>
+		<para>-1: connection was not found or an error occurred</para>
+		<example>
+			<title><function>tcp_con_alive</function> usage</title>
+			<programlisting><![CDATA[
+...
+	if(!tcp_con_alive("1.2.3.4:5060")) {
+		xlog("connection not found\n");
+	}
 ...
 			]]></programlisting>
 		</example>