[ntcore] Add client disconnect function (#5022)

As setServer doesn't disconnect, it's useful to have a function that
disconnects without needing to completely stop the client.
This commit is contained in:
Peter Johnson
2023-02-03 15:28:00 -08:00
committed by GitHub
parent 7b828ce84f
commit b61ac6db33
12 changed files with 73 additions and 0 deletions

View File

@@ -1298,6 +1298,18 @@ Java_edu_wpi_first_networktables_NetworkTablesJNI_setServerTeam
nt::SetServerTeam(inst, team, port);
}
/*
* Class: edu_wpi_first_networktables_NetworkTablesJNI
* Method: disconnect
* Signature: (I)V
*/
JNIEXPORT void JNICALL
Java_edu_wpi_first_networktables_NetworkTablesJNI_disconnect
(JNIEnv* env, jclass, jint inst)
{
nt::Disconnect(inst);
}
/*
* Class: edu_wpi_first_networktables_NetworkTablesJNI
* Method: startDSClient