Auron QuickServer

Build, test or simulate TCP/IP socket applications in JavaScript with Auron QuickServer

The Auron QuickServer is an easy to use Windows freeware tool to build, test or simulate your TCP/IP socket applications in JavaScript.

With Auron QuickServer you can:

  • Build, test or simulate your TCP/IP socket applications
  • Build client as well as server applications
  • Supports TLS/SSL security or plain data transfer
  • Support for IPv4 and IPv6
  • Script your application in JavaScript
  • Control your JavaScript directly from the QuickServer UI.
  • Automatic logging

Freeware

This product is free to use for any purpose. The copyright of this program remains with Auron Software.

Download

We use the Auron QuickServer in-house to simulate GSM modems or SMTP connections. It’s also great to use for simulating the server end of custom TCP based interfaces for things like automatic gate control or chemical testing stations, load cells, etc…

How to use

The Auron Quickserver only has one window which is visible immediately after startup. The window is split into 4 distinct sections. From top to bottom: Script, Session control and feedback, Log and status. Like so:

Auron Quick Server

Script section

Your client or server application is build using JavaScript. You can create a new script or open an existing script in the scripting session. Find out more about the layout of this script in the ‘QuickServer Script‘ section below.

Right below the script path there’s a tab control to run the script:

  • Server tab. Use this tab for server scripts. This is where you can specify which certificate to use to make your server TLS enabled. Specify whether the server should listen on IPv4 or IPv6. And start and stop your server from here.
  • Client tab. Use this tab for client scripts. You can connect to an existing server by specifying an IP address, port number and whether or not the connection should be secure.
  • Misc. This is where you can setup your command delimiter(s) as well as your timer setting. Each script can have a timer that runs ever n milliseconds.
  • Description. This tab contains a description of your script function.

Session control and feedback section

In some cases you may want to control the behavior of your script or you’ll want feedback from your script. This is what this section is for. Click on the buttons to trigger an event in the script. The checkboxes next to the buttons can be set automatically from the script.

In case of a server script you can select which client instance you want to observe or which should receive the button events. Use the boot button to ‘kick’ the selected session.

Log section

This is where you can see exactly what’s happening in the script. In case of a server script each connected session as well as the server itself has it’s own log file. In case of a client script you can see the details of running a client script.

Status section

This field always holds the current status of the server. If you’re still unsure of what’s happening you can just glance at this field to get a high-level perspective on the situation.

QuickServer script

A QuickServer script is always JavaScript and always has the same layout. For convenience QuickServer can automatically generate this script for you if you click on the ‘new script’ button in the script sections of the QuickServer window.

This is what a QuickServer script looks like:

// Auron QuickServer v3.2.0.1001 script file

// Context key constants. Use these keys in the context dictionary to setup specific QuickServer settings
var CTX_KEY_LOG           = "LOG"           // Use this key to add a line to the log file that's visible in the GUI
var CTX_KEY_CHECK         = "CHECK"         // Set to bit flag to enable check boxes in the GUI

// Settings that can be set in the 'onLoad' function to preset the GUI after loading.
// Use these to setup defaults for your script
var CTX_KEY_DESCRIPTION   = "DESCRIPTION"
var CTX_KEY_HOSTNAME      = "HOSTNAME"
var CTX_KEY_PORT          = "PORT"          // Sets both client and server port
var CTX_KEY_SECURE        = "SECURE"        // Set to 1 or 0 for client; set to existing certificate name for server
var CTX_KEY_TIMEOUT       = "TIMEOUT"       // In milliseconds
var CTX_KEY_DELIMITER     = "DELIMITER"     // Use  for carriage return and  for linefeed
var CTX_KEY_ALTDELIMITER  = "ALTDELIMITER"  // Use  for carriage return and  for linefeed
var CTX_KEY_MODE          = "MODE"          // Use 'CLIENT' or 'SERVER' to pre-open client or server tab
var CTX_KEY_IPVERSION     = "IPVERSION"     // Use 4 for IPv4 and 6 for IPv6

// Called by the GUI directly after loading the file
function onLoad(dctContext)
{  
  // This statement sets the description that's visible in the description tab. 
  // You can use the context keys above to set further default values here.
  dctContext.Item(CTX_KEY_DESCRIPTION) = "This is a newly created template script. " +
    "Please add some more details about how this script should be used and how it works. " +
    "Your future-self will thank you for it!"
  dctContext.Item(CTX_KEY_MODE) = "SERVER"
}

// In a server script QuickServer calls this function right after a new session connects
function onConnect(sHost, nPort, dctContext)
{
    Log(dctContext, "Write a log line on connect")

}

// In a server script QuickServer calls this function right after an existing session disconnects
function onDisconnect(sHost, nPort, dctContext)
{
  
}

// On receiving a string from the session return a string if a reply should be send.
function onReadString(sHost, nPort, sString, dctContext)
{
  return "Echo: " + sString 
}
  
// On every timer interval return a string to send something to the session
function onTimer(sHost, nPort, nIteration, dctContext)
{
  
}

// On clicking one of the control buttons return a string to send something to the session
function onButton(sHost, nPort, sButtonName, dctContext)
{
  
}

// Add a line to the log file once the interface function ends
function Log(dctContext, sLine)
{ 
  dctContext.Item(CTX_KEY_LOG) = sLine
}