public static void unPublishPort(OtpLocalNode node)
{
try
{
using (TcpClient s = new TcpClient(Dns.GetHostName(), EpmdPort.get()))
{
OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(node.Alive.Length + 1);
obuf.write1(stopReq);
obuf.writeN(Encoding.GetEncoding("iso-8859-1").GetBytes(node.Alive));
obuf.WriteTo(s.GetStream());
// don't even wait for a response (is there one?)
if (traceLevel >= traceThreshold)
{
log.Debug("-> UNPUBLISH " + node + " port=" + node.Port);
log.Debug("<- OK (assumed)");
}
}
}
catch (Exception) /* ignore all failures */
{
}
}