Skip to content

A LiveSplit Component that allows a remote connection and control of LiveSplit by starting a small server within LiveSplit.

Notifications You must be signed in to change notification settings

LiveSplit/LiveSplit.Server

Repository files navigation

⚠️ This component has been deprecated; all of its functionality has been incorporated into the internal LiveSplit server.

LiveSplit Server

LiveSplit Server is a LiveSplit component that allows for other programs and other computers to control LiveSplit.

Install

Consider using the latest development build of LiveSplit available at http://livesplit.org/LiveSplitDevBuild.zip. This includes the server component and any new features since the last release that applications may depend on.

Alternatively:

Setup

Add the component to the Layout (Control -> LiveSplit Server). In Layout Settings, you can change the Server Port and view your local IP Address.

Control

You MUST start the Server before programs can talk to it (Right click on LiveSplit -> Control -> Start Server). You MUST manually start it each time you launch LiveSplit.

Layout Settings

Port

Port is the door (1 of thousands) on your computer that this program sends data through. Default is 16834. This should be fine for most people, but depending on network configurations, some ports may be blocked. See also https://en.wikipedia.org/wiki/Port_%28computer_networking%29

Local IP

Local IP is the address of your computer on your network. It is needed for other computers or phones on your network to talk to yours. Programs on your computer should be able to use "localhost".

Note that this is NOT your public IP with most network configurations. In most cases, it means nothing if it is seen on stream. DO NOT search "what is my IP" on stream as that will show you your public IP.

The local IP is the "IPv4 Address" of the first connected network adapter. This is normally what clients need, but software (such as virtual machines or VPNs) may add network adapters which can appear first. If in doubt, open Command Prompt and run ipconfig. The device you are looking for is probably either "Ethernet adapter Ethernet" or "Wireless LAN adapter Wi-Fi".

Using Across the Internet

To make a public server, consider learning to set up a web server and use what you learn. It is probably wiser, safer, and easier to use an IRC bot or something else though. Look at "Known Uses" or ask around.

Known Uses

Made something cool? Consider getting it added to this list.

Commands

Commands are case sensitive and end with a carriage return and a line feed (\r\n). You can provide parameters by using a space after the command and sending the parameters afterwards (<command><space><parameters><\r\n>).

A command can respond with a message. The message ends with a carriage return and a line feed, just like a command.

Here's the list of commands:

  • startorsplit
  • split
  • unsplit
  • skipsplit
  • pause
  • resume
  • reset
  • starttimer
  • setgametime TIME
  • setloadingtimes TIME
  • pausegametime
  • unpausegametime
  • alwayspausegametime
  • setcomparison COMPARISON
  • switchto realtime
  • switchto gametime
  • setsplitname INDEX NAME
  • setcurrentsplitname NAME

The following commands respond with a time:

  • getdelta
  • getdelta COMPARISON
  • getlastsplittime
  • getcomparisonsplittime
  • getcurrentrealtime
  • getcurrentgametime
  • getcurrenttime
  • getfinaltime
  • getfinaltime COMPARISON
  • getpredictedtime COMPARISON
  • getbestpossibletime

Other commands:

  • getsplitindex
  • getcurrentsplitname
  • getprevioussplitname
  • getcurrenttimerphase

Commands are defined at ProcessMessage in "ServerComponent.cs".

Example Clients

Python

import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("localhost", 16834))
s.send(b"starttimer\r\n")

Java 7+

import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;

public class MainTest {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost", 16834);
        PrintWriter writer = new PrintWriter(socket.getOutputStream());
        writer.write("starttimer\r\n");
        writer.flush();
        socket.close();
    }
}

Node.js

Node.js client implementation available here: https://github.com/satanch/node-livesplit-client

About

A LiveSplit Component that allows a remote connection and control of LiveSplit by starting a small server within LiveSplit.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages