Retrieves a connection from the pool. Make sure to close the connection when you are done with it.
Asynchronously gets a SQL connection. This method is useful in UI applications as it prevents the main thread from freezing until the connection is available. The ConnectionReady event will be raised when the connection is ready.
Represents a HTTP cookie. You can add cookies to the response with ServletResponse.AddCookie. These cookies will then be sent in the following browser requests. You can fetch the cookies with ServletRequest.GetCookies.
HttpSessions allows you to identify a user across multiple requests and to store data specific to this user. The session id is stored as a cookie in the user browser, or as a URL parameter if cookies are disabled. The data is stored in the server memory. Getting and creating sessions is done with ServletRequest.GetSession.
Returns the value tied to the attribute with the specified name. Returns the DefaultValue if no value exists.
Returns a List with all the session names.
HasAttribute (NameAsString) AsBoolean
Tests whether there is a value tied to the given name.
IdAsString [read only]
Returns the session unique id.
Invalidates the session. This causes the session to be deleted.
IsNewAsBoolean [read only]
Returns true if the session was created in this request.
LastAccessedTimeAsLong [read only]
Returns the last time the user sent a request associated with this session.
Gets or sets the maximum inactive interval, in seconds. The session will be invalidated if there was not any activity for a period larger than this value. The default value is -1 which means that there is no maximum interval.
Removes the attribute with the given name.
SetAttribute (NameAsString, ValueAsObject)
Adds an attribute to the session. If there is an existing value with the same name then it will be replaced.
Change (Params As Map) Click (Params As Map) DblClick (Params As Map) Focus (Params As Map) FocusIn (Params As Map) FocusOut (Params As Map) KeyUp (Params As Map) MouseDown (Params As Map) MouseEnter (Params As Map) MouseLeave (Params As Map) MouseMove (Params As Map) MouseUp (Params As Map)
Adds a background worker. An instance of the specified class will be created and initialized from a background thread. Class - The class name. The class should be a standard class (not server handler).
You can call StartMessageLoop in the Initialize sub to keep the class instance running for as long as needed. Note that in debug mode the code will be executed by the main thread.
AddDoSFilter (PathAsString, SettingsAsMap)
Adds a filter that protects against intentional or unintentional denial of service attacks. It restricts the number of requests sent from the same connection. Path - The filter will be mapped to the given path. You can use wildcards in the path. Settings - An optional map with various settings. See this link: DoS Filter Documentation
Maps a filter class. Path - The filter will be mapped to the following path. You can use wildcards in the path. Class - The class name (string). SingleThreadHandler - Whether this handler should always run in the main thread.
Maps a handler class. Path - The handler will be mapped to the following path. You can use wildcards in the path. Class - The class name (string). SingleThreadHandler - Whether this handler should always run in the main thread.
AddWebSocket (PathAsString, ClassAsString)
Maps a WebSocket class. Path - The WebSocket will be mapped to this path. Class - WebSocket class (string).
Returns an initialized Map that can safely be accessed by multiple threads (based on Java ConcurrentHashMap). Unlike the standard Map the order of items is not preserved. Note that this Map does not support the following methods: GetKeyAt and GetValueAt.
CurrentThreadIndexAsInt [read only]
Each thread is mapped to a specific index. This property returns the current thread index. Note that the main thread index is always 0.
DebugNetworkLatencyAsInt [write only]
Sets the emulated network latency in debug mode, measured in milliseconds. Default value is 100. You should only call this method before the server is started. The emulated latency only affects server -> client -> server round-trips.
GzipEnabledAsBoolean [write only]
Calling this method will cause the server to compress the responses if the client supports GZIP responses and the resource mime type is not of a known compressed type. In most cases it should be enabled.
Gets or sets whether Http/2.0 is enabled. Note that it requires some configuration (see the tutorial for more information).
Initializes the server. EventName is currently not used.
Gets or sets the logs files folder.
Gets or sets the number of days the rotated logs will be kept.
Sets whether "waiting for value" messages are logged. These messages can help you to optimize the code and reduce the network latency effects.
Gets or sets the server port.
This method allows you to set custom error pages. The PagesMap maps between status codes (such as 404 and 500) and the handlers or pages that will be called for each error. This method should be called before the server is started. Example: DimerrAsMap err.Initialize err.Put(404, "/404.html") 'map to a custom page srvr.SetCustomErrorPages(err)