Skip to content

Commit

Permalink
Minor updates to improve stability and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonholmgren committed Jan 21, 2024
1 parent ab9ffaf commit 3a01178
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions template/qub/server.bas
Expand Up @@ -73,6 +73,9 @@ Do
For c = 1 To MAX_CLIENTS
' If this connection is active
If client_handle(c) Then
' Add logging to monitor connection processing
Print "Processing connection #" + Str$(c) + " (" + Str$(ROUND((Timer(.001) - client_expiry(c)) / 1000, 1)) + "ms old)"

' work on the request in an effort to finish it
If handle_request(c) Then
' Ignore "captive" pings
Expand Down Expand Up @@ -124,8 +127,8 @@ Do
Loop
End If

' 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
_Limit 500 ' default 50
' Limit CPU usage and leave some time for stuff be sent across the network
_Limit 100 ' default 100, range 1-1000. Higher numbers = better perf at cost of higher idle CPU usage
Loop Until InKey$ = Chr$(27) ' escape quits

' After a keypress, close all connections and quit
Expand Down

0 comments on commit 3a01178

Please sign in to comment.