ServerPortPatches
A static class in TavernLib, TavernLib.Patches.
Moves the game's hard-coded web server (1761) and websocket console (1760) to web_port and console_port in tavern_server.json, so two servers can share an address. Server.
- Listed in TavernLib.Patches
- Attributes
HarmonyPatch
Properties
1 private and internal property
| Member | What it is |
|---|---|
private static TavernServer Ports { get; } | The last-read tavern_server.json settings for the web and console ports, or null before TavernManager exists. |
Methods
| Member | What it is |
|---|---|
static int ConsolePort() | The console port from tavern_server.json, or 1760 without one. Called from the patched WebSocketRemoteConsole.Start. |
static IEnumerable<CodeInstruction> ConsolePortTranspiler(IEnumerable<CodeInstruction> instructions) (iterator) | Transpiler on WebSocketRemoteConsole.Start that swaps the constant 1760 for a call to ConsolePort. Warns unless it found exactly one. |
static void WebPort(ref int port) | Prefix on the WebServerThread constructor that changes a port of 1761 to the configured web port. |