Skip to content
Anthony Diamond edited this page May 12, 2015 · 5 revisions

Introduction

As of the first pre-release, IOSync supports configuration through an external INI file. This file may be used to limit what "virtual devices" may be connected, as well as platform-specific configuration, such as XInput injection.

Using a Configuration File

IOSync's configuration functionality allows you to easily manage virtual devices. This allows you to limit what can and can not be done on your machine. In addition to this, a configuration file allows you to quickly restart the application, without going through the input-boilerplate.

In this article, I'll be going over most of IOSync's configuration functionality. As a reference, here's descriptions for each section and its properties. If a property does not specify specific values, or kinds of values, it should be assumed as a boolean (true/false, 1/0, Y/N).

Sections:

  • application : This houses configuration options for the application itself. (Client & Server)
    • Properties:
      • config : This allows you to specify a different custom configuration-file.
      • force_cmd : This allows you to force external configurations to be disabled. (Does not take priority over 'config')
      • mode: The application-mode used by IOSync internally. (0 = Client, 1 = Server)
  • devices : This houses configuration options for "virtual devices". (Client & Server)
    • Properties:
      • keyboard : This may be used to toggle keyboard device-connection. (Client: Detection. | Server: Simulation.)
      • gamepads : This may be used to toggle connection of gamepads. (Client: Detection, auto-connect, etc. | Server: "Virtual device" creation, simulation, etc.)
      • max_controllers : This specifies the maximum number of controllers/gamepads that are possible to connect. By specifying maximum, you ensure that the number of gamepads is not artificially limited. (Client: Physical controllers | Server: Virtual controllers) (Property name may change)
      • vjoy: Enables vJoy simulation-support for servers. (Server)
      • vjoy_offset: Offsets the initial vJoy device used. (Server: Experimental)
  • network: This houses configuration options for networking options. (Client & Server)
    • Properties:
      • address : The address used to connect to a remote system. (Client: A port may also be specified by using the : separator. | Server: If a port is specified, it will be used.)
      • port : This may be used to manually supply a port, rather than using address. This takes priority over that property. The default symbol may be used in order to use the default port. (Client & Server)
      • username : A semi-unique name for the current machine, when referenced by a server. (Client: Used for debugging and informational purposes. | Server: Currently unused.)
  • xinput: A Windows-only section used to configure XInput-related functionality. (Server, currently)
    • Properties:
      • processes : This is used to "inject" into remote processes. The input should ideally be represented within [] brackets, and must be separated by | symbols. The input may be an executable name (Partially undefined, use at your own risk), a process ID (PID; view your task manager for details), or the name of one of the application's windows (Has potential issues, but generally the most reliable).

When starting IOSync without a configuration-file, you will be prompted to specify or create one. This is beneficial for those who prefer a file-interface. If you do not wish to use a configuration file, you may decline this prompt. To stop receiving this notification, you may create a file called "config.ini" with the following contents:

[application] force_cmd = 1

Using the Command-line

Since the very first version of the modern code-base of IOSync, console I/O has been available. In today's builds, the command-line is quickly skipped upon subsequent executions. This is due to the convenience of editing an INI file. For details on forcing the command-line interface at all times, please view the "Using a Configuration File" section.

If no console/shell is provided, IOSync may (On Windows) manually allocate one itself. This means you'll be able to start the application without the command-line, and still be able to use the program directly. The command-line configuration process should be self-explanatory, so I won't be going over it. If you have any issues using the standard command-line interface, feel free to open an issue.

Manual commands/arguments:

Behavior may be different in your version (Use at your own risk).

At this time, IOSync does not support proper configuration using application-arguments. It does, however, support "quick-launching" using these arguments. This behavior is largely susceptible to change, but here's a rough overview of the current "arguments":

The following argument-numbers are partially following the C and C++ standards' 'argv' model for 'main'. This does not represent the actual code that actually handles the arguments. Internal variable naming-schemes are not relevant. In addition, arguments may have multiple meanings:

  • argv[0]: (Partially undefined)
    • Usually system-reserved for the path of the application.
    • IGNORE: Used for XInput injection requests; may not be provided.
  • argv[1]:
    • The port used to automatically host upon execution. (Server)
    • The address used to automatically connect to a remote machine. (Client)
    • XI_INJECT: Used by external applications (Other architecture) to inject an appropriate XInput injection module.
  • argv[2]:
    • The port used when automatically connecting with the previous argument; default unresolved, please use an actual number. (Client)
    • The process ID (PID) that XI_INJECT uses to target an application.

Use the above information at your own risk. Some of this information may not even be applicable to your version of IOSync. There are currently no plans for adding proper configuration options using command-line arguments.