Support persistent connection, even in single thread mode (i.e concurrency=none).
Warning: as there is no concurrent request handling in single threaded mode,
it is recommended to either set the keep_alive_timeout to a small value,
or disable persistent connection by setting max_keep_alive_requests to 0.
Change the default keep_alive_timeout from 15 to 5 seconds.
Accept -1 as value of max_keep_alive_requests to have unlimited number of request in the same persistent connection.
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<target name="websocket_app">
|
||||
<root class="APPLICATION" feature="make_and_launch"/>
|
||||
<file_rule>
|
||||
<exclude>/\.svn$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true">
|
||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||
@@ -17,6 +17,14 @@
|
||||
<library name="wsf" location="..\..\library\server\wsf\wsf.ecf"/>
|
||||
<cluster name="app" location=".\" recursive="true"/>
|
||||
</target>
|
||||
<target name="websocket_app_st" extends="websocket_app">
|
||||
<description>Single thread solution.
|
||||
Warning: as it can not handle concurrent request, it is recommended to set Keep-Alive-Timeout to very low value, as browser will keep persistent connection open too long.
|
||||
</description>
|
||||
<capability>
|
||||
<concurrency use="none"/>
|
||||
</capability>
|
||||
</target>
|
||||
<target name="websocket_app_ssl" extends="websocket_app">
|
||||
<variable name="ssl_enabled" value="true"/>
|
||||
</target>
|
||||
|
||||
@@ -2,11 +2,11 @@ verbose=true
|
||||
verbose_level=INFORMATION
|
||||
port=9090
|
||||
max_concurrent_connections=100
|
||||
keep_alive_timeout=35
|
||||
keep_alive_timeout=2
|
||||
max_keep_alive_requests=-1
|
||||
max_tcp_clients=100
|
||||
socket_timeout=30
|
||||
socket_recv_timeout=5
|
||||
max_keep_alive_requests=300
|
||||
|
||||
is_secure=false
|
||||
secure_certificate=ca.crt
|
||||
|
||||
Reference in New Issue
Block a user