Add support for SRV records (#6982)

* SRV record support

* respect the formatting II

* avoid blocking call

* Add android support

* switch to stripped down version of dnsjava

* move srv lookup from `Net` to `NetProvider`

* random optimizations

* bump arc and restart the thing

* reimplement using ArcDns

* Update core/src/mindustry/net/ArcNetProvider.java

Co-authored-by: buthed010203 <naguiar010203@gmail.com>

* Update ArcNetProvider.java

Co-authored-by: buthed010203 <naguiar010203@gmail.com>
This commit is contained in:
Phinner
2022-07-03 10:37:58 -04:00
committed by GitHub
co-authored by buthed010203
parent 4d5f16e75d
commit 685e3cac83
3 changed files with 31 additions and 9 deletions
+5 -2
View File
@@ -325,6 +325,7 @@ public class Net{
/**
* Pings a host in a pooled thread. If an error occurred, failed() should be called with the exception.
* If the port is the default mindustry port, SRV records are checked too.
*/
public void pingHost(String address, int port, Cons<Host> valid, Cons<Exception> failed){
pingExecutor.submit(() -> provider.pingHost(address, port, valid, failed));
@@ -375,7 +376,10 @@ public class Net{
*/
void discoverServers(Cons<Host> callback, Runnable done);
/** Ping a host. If an error occurred, failed() should be called with the exception. This method should block. */
/**
* Ping a host. If an error occurred, failed() should be called with the exception. This method should block.
* If the port is the default mindustry port (6567), SRV records are checked too.
*/
void pingHost(String address, int port, Cons<Host> valid, Cons<Exception> failed);
/** Host a server at specified port. */
@@ -393,5 +397,4 @@ public class Net{
closeServer();
}
}
}