Skip to content

Commit db0a359

Browse files
committed
Fix NT start after NT3 removal
1 parent fe0388a commit db0a359

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/ntcore/Natives/NtCore.ClientServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static partial class NtCore
2424

2525
[LibraryImport("ntcore", EntryPoint = "NT_StartServer")]
2626
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
27-
public static partial void StartServer(NtInst inst, WpiString persistFilename, WpiString listenAddres, uint port3, uint port4);
27+
public static partial void StartServer(NtInst inst, WpiString persistFilename, WpiString listenAddres, uint port);
2828

2929
[LibraryImport("ntcore", EntryPoint = "NT_StopServer")]
3030
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]

src/ntcore/NetworkTableInstance.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ public static NetworkTableInstance GetInstanceForHandle(NtInst inst)
6464
private readonly ConcurrentDictionary<NtTopic, Topic> m_topicsByHandle = new();
6565
private readonly ListenerStorage m_listeners;
6666
private readonly bool m_owned;
67-
68-
public const int KDefaultPort3 = 1735;
69-
public const int KDefaultPort4 = 5810;
67+
public const int KDefaultPort = 5810;
7068

7169
private NetworkTableInstance(NtInst inst, bool owned)
7270
{
@@ -483,9 +481,9 @@ public void StopLocal()
483481
NtCore.StopLocal(Handle);
484482
}
485483

486-
public void StartServer(string persistFilename = "networktables.json", string listenAddress = "", int port3 = KDefaultPort3, int port4 = KDefaultPort4)
484+
public void StartServer(string persistFilename = "networktables.json", string listenAddress = "", int port = KDefaultPort)
487485
{
488-
NtCore.StartServer(Handle, persistFilename, listenAddress, (uint)port3, (uint)port4);
486+
NtCore.StartServer(Handle, persistFilename, listenAddress, (uint)port);
489487
}
490488

491489
public void StopServer()

0 commit comments

Comments
 (0)