Skip to content

Commit 3a01178

Browse files
committed
Minor updates to improve stability and logging
1 parent ab9ffaf commit 3a01178

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

template/qub/server.bas

+5-2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ Do
7373
For c = 1 To MAX_CLIENTS
7474
' If this connection is active
7575
If client_handle(c) Then
76+
' Add logging to monitor connection processing
77+
Print "Processing connection #" + Str$(c) + " (" + Str$(ROUND((Timer(.001) - client_expiry(c)) / 1000, 1)) + "ms old)"
78+
7679
' work on the request in an effort to finish it
7780
If handle_request(c) Then
7881
' Ignore "captive" pings
@@ -124,8 +127,8 @@ Do
124127
Loop
125128
End If
126129

127-
' Limit CPU usage and leave some time for stuff be sent across the network..I have it as high as 1000 on my Front End
128-
_Limit 500 ' default 50
130+
' Limit CPU usage and leave some time for stuff be sent across the network
131+
_Limit 100 ' default 100, range 1-1000. Higher numbers = better perf at cost of higher idle CPU usage
129132
Loop Until InKey$ = Chr$(27) ' escape quits
130133

131134
' After a keypress, close all connections and quit

0 commit comments

Comments
 (0)