Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ _getServerPort()

static string ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection._getServerPort ( )
inlinestaticprivate

Definition at line 411 of file GameSenseConnection.cs.

412 {
413 //IL_0014: Unknown result type (might be due to invalid IL or missing references)
414 //IL_0031: Unknown result type (might be due to invalid IL or missing references)
415 string result = null;
416 string text = _readProps();
417 if (text != null)
418 {
419 try
420 {
421 JObject jObject = JObject.Parse(text);
422 coreProps coreProps = default(coreProps);
423 coreProps.address = (string)jObject.GetValue("address");
424 string[] array = coreProps.address.Split(':');
426 result = array[1];
427 return result;
428 }
429 catch (Exception e)
430 {
431 _logException("Cannot parse port information", e);
432 return result;
433 }
434 }
435 return result;
436 }
static ushort ToUInt16(object? value)
Definition Convert.cs:1177

References ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection._logException(), ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection._readProps(), System.array, System.text, and System.Convert.ToUInt16().

Referenced by ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection._gamesenseWrk().