Explorar o código

evapi: documented netstring_format parameter

Daniel-Constantin Mierla %!s(int64=11) %!d(string=hai) anos
pai
achega
8adf574962
Modificáronse 2 ficheiros con 45 adicións e 10 borrados
  1. 23 8
      modules/evapi/README
  2. 22 2
      modules/evapi/doc/evapi_admin.xml

+ 23 - 8
modules/evapi/README

@@ -27,6 +27,7 @@ Daniel-Constantin Mierla
 
               3.1. workers (int)
               3.2. bind_addr (str)
+              3.3. netstring_format (int)
 
         4. Functions
 
@@ -46,10 +47,11 @@ Daniel-Constantin Mierla
 
    1.1. Set workers parameter
    1.2. Set bind_addr parameter
-   1.3. evapi_relay usage
-   1.4. TCP message
-   1.5. evapi_async_relay usage
-   1.6. evapi_evapi usage
+   1.3. Set netstring_format parameter
+   1.4. evapi_relay usage
+   1.5. TCP message
+   1.6. evapi_async_relay usage
+   1.7. evapi_evapi usage
 
 Chapter 1. Admin Guide
 
@@ -65,6 +67,7 @@ Chapter 1. Admin Guide
 
         3.1. workers (int)
         3.2. bind_addr (str)
+        3.3. netstring_format (int)
 
    4. Functions
 
@@ -104,6 +107,7 @@ Chapter 1. Admin Guide
 
    3.1. workers (int)
    3.2. bind_addr (str)
+   3.3. netstring_format (int)
 
 3.1. workers (int)
 
@@ -128,6 +132,17 @@ modparam("evapi", "workers", 2)
 modparam("evapi", "bind_addr", "1.2.3.4:8228")
 ...
 
+3.3. netstring_format (int)
+
+   Control if messages from clients are encapsulated in netstring format.
+
+   Default value is 1 (netstring format).
+
+   Example 1.3. Set netstring_format parameter
+...
+modparam("evapi", "netstring_format", 0)
+...
+
 4. Functions
 
    4.1. evapi_relay(evdata)
@@ -141,14 +156,14 @@ modparam("evapi", "bind_addr", "1.2.3.4:8228")
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.3. evapi_relay usage
+   Example 1.4. evapi_relay usage
 ...
 evapi_relay("{ \"event\": \"test\",\n \"data\": { \"fU\": \"$fU\" }\n}");
 ...
 
    The above exaple will send the following message over tcp:
 
-   Example 1.4. TCP message
+   Example 1.5. TCP message
 ...
 47:{
  "event": "test",
@@ -165,7 +180,7 @@ evapi_relay("{ \"event\": \"test\",\n \"data\": { \"fU\": \"$fU\" }\n}");
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 1.5. evapi_async_relay usage
+   Example 1.6. evapi_async_relay usage
 ...
 evapi_relay("{ \"event\": \"suspend\",\n \"data\":"
         " { \"index\": \"$T(id_index)\", \"label\": \"$T(id_label)\" }\n}");
@@ -177,7 +192,7 @@ evapi_relay("{ \"event\": \"suspend\",\n \"data\":"
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.6. evapi_evapi usage
+   Example 1.7. evapi_evapi usage
 ...
 event_route[evapi:connection-new] {
   if($evapi(srcaddr)!="127.0.0.1") {

+ 22 - 2
modules/evapi/doc/evapi_admin.xml

@@ -53,7 +53,7 @@
 	</section>
 	<section>
 	<title>Parameters</title>
-	<section>
+	<section id="evapi.p.workers">
 		<title><varname>workers</varname> (int)</title>
 		<para>
 			Number of worker processes to be started to handle incoming messages
@@ -73,7 +73,7 @@ modparam("evapi", "workers", 2)
 </programlisting>
 		</example>
 	</section>
-	<section>
+	<section id="evapi.p.bind_addr">
 		<title><varname>bind_addr</varname> (str)</title>
 		<para>
 		Local IP and port to listen on for incoming TCP connections.
@@ -89,6 +89,26 @@ modparam("evapi", "workers", 2)
 ...
 modparam("evapi", "bind_addr", "1.2.3.4:8228")
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="evapi.p.netstring_format">
+		<title><varname>netstring_format</varname> (int)</title>
+		<para>
+			Control if messages from clients are encapsulated in netstring
+			format.
+		</para>
+		<para>
+		<emphasis>
+			Default value is 1 (netstring format).
+		</emphasis>
+		</para>
+		<example>
+		<title>Set <varname>netstring_format</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("evapi", "netstring_format", 0)
+...
 </programlisting>
 		</example>
 	</section>