/// <exception cref="UnknownHostException"></exception> internal virtual NbtAddress[] GetNodeStatus(NbtAddress addr) { //Log.Out("NameSerciceClient.GetNodeStatus"); int n; int srcHashCode; NodeStatusRequest request; NodeStatusResponse response; response = new NodeStatusResponse(addr); request = new NodeStatusRequest(new Name(NbtAddress.AnyHostsName, unchecked (0x00), null)); request.Addr = addr.GetInetAddress(); n = RetryCount; while (n-- > 0) { try { Send(request, response, RetryTimeout); } catch (IOException ioe) { if (_log.Level > 1) { Runtime.PrintStackTrace(ioe, _log); } throw new UnknownHostException(ioe); } if (response.Received && response.ResultCode == 0) { srcHashCode = request.Addr.GetHashCode(); for (int i = 0; i < response.AddressArray.Length; i++) { response.AddressArray[i].HostName.SrcHashCode = srcHashCode; } return(response.AddressArray); } } throw new UnknownHostException(); }
/// <exception cref="UnknownHostException"></exception> internal virtual NbtAddress[] GetNodeStatus(NbtAddress addr) { int n; int srcHashCode; NodeStatusRequest request; NodeStatusResponse response; response = new NodeStatusResponse(addr); request = new NodeStatusRequest(new Name(NbtAddress.AnyHostsName, unchecked(0x00), null)); request.Addr = addr.GetInetAddress(); n = RetryCount; while (n-- > 0) { try { Send(request, response, RetryTimeout); } catch (IOException ioe) { if (_log.Level > 1) { Runtime.PrintStackTrace(ioe, _log); } throw new UnknownHostException(ioe); } if (response.Received && response.ResultCode == 0) { srcHashCode = request.Addr.GetHashCode(); for (int i = 0; i < response.AddressArray.Length; i++) { response.AddressArray[i].HostName.SrcHashCode = srcHashCode; } return response.AddressArray; } } throw new UnknownHostException(); }