private void Cleanup() { ClearClientInfo(); if (packetListener != null) { packetListener.Dispose(); packetListener = null; } if (packetSender != null) { packetSender.Dispose(); packetSender = null; } }
private void AddServerHandlers() { packetListener = new LdpPacketListener(); packetSender = new LdpPacketSender(); authRequestHandler = new LdpAuthRequestHandler(); disconnectHandler = new LdpDisconnectRequestHandler(); packetListener.AddListener(authRequestHandler); packetListener.AddListener(disconnectHandler); }