Source/NFX.Erlang/Connect/ErlEpmd.cs
/// <summary>
/// Unregister from Epmd.
/// Other nodes wishing to connect will no longer be able to
/// </summary>
Unregister from Epmd.
Other nodes wishing to connect will no longer be able to
Unregister from Epmd . Other nodes wishing to connect will no longer be able to
public static void UnPublishPort(ErlLocalNode node)
    {
      IErlTransport s = null;
      try
      {
        s = node.Epmd ?? new ErlTcpTransport(ErlLocalNode.LocalHost, EPMD_PORT) { NodeName = node.NodeName.Value };
        ErlOutputStream obuf = new ErlOutputStream(
            writeVersion: false, capacity: node.AliveName.Length + 8);
        obuf.Write2BE(node.AliveName.Length + 1);
        obuf.Write1((byte)Indicator.StopReq);
        var buf = Encoding.ASCII.GetBytes(node.AliveName);
        obuf.Write(buf);
        obuf.WriteTo(s.GetStream());
        node.OnTrace(ErlTraceLevel.Epmd, Direction.Outbound, () =>
                StringConsts.ERL_EPMD_UNPUBLISH.Args(node.NodeName.Value, node.Port));
      }
      catch
      {
        s = null;
      }
      finally
      {
        if (s != null)
          try { s.Close(); } catch { }
        node.Epmd = null;
      }
    }
public static void UnPublishPort ( ErlLocalNode node ) { IErlTransport s = null ; try { s = node . Epmd ?? new ErlTcpTransport ( ErlLocalNode . LocalHost , EPMD_PORT ) { NodeName = node . NodeName . Value } ; ErlOutputStream obuf = new ErlOutputStream ( writeVersion : false , capacity : node . AliveName . Length + 8 ) ; obuf . Write2BE ( node . AliveName . Length + 1 ) ; obuf . Write1 ( ( byte ) Indicator . StopReq ) ; var buf = Encoding . ASCII . GetBytes ( node . AliveName ) ; obuf . Write ( buf ) ; obuf . WriteTo ( s . GetStream ( ) ) ; node . OnTrace ( ErlTraceLevel . Epmd , Direction . Outbound , ( ) => StringConsts . ERL_EPMD_UNPUBLISH . Args ( node . NodeName . Value , node . Port ) ) ; } catch { s = null ; } finally { if ( s != null ) try { s . Close ( ) ; } catch { } node . Epmd = null ; } }
Unregister from Epmd.
Unregister from Epmd .
node
ErlLocalNode