MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / getCachedSrv

Method getCachedSrv

src/main/java/io/DnsSrvResolver.java:74–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 private boolean getCachedSrv() {
75 DataInputStream inputStream=NvStorage.ReadFileRecord(getSrvRecordName(), 0);
76 try {
77 resolvedHost=inputStream.readUTF();
78 resolvedPort=inputStream.readInt();
79 ttl=inputStream.readLong();
80 inputStream.close();
81
82 if (ttl>Time.utcTimeMillis()) {
83 return true;
84 }
85
86 } catch (Exception e) {
87 }
88 return false;
89 }
90
91 private void writeSrvCache() {
92

Callers 1

getSrvMethod · 0.95

Calls 4

ReadFileRecordMethod · 0.95
getSrvRecordNameMethod · 0.95
utcTimeMillisMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected