public void AddServerInterface(IServerNetworkInterface serverInf) { if (IsRunning) throw new InvalidOperationException("An interface cannot be added whilst the network adapter is running, if you want this functionality implement the ThreadSafeList component."); ServerInterfaces.Add(serverInf); }
public ServerReactor(IServerNetworkInterface networkInterface) { handlers = new Dictionary <byte, ServerMessageHandler>(); networkInterface.ReceivedPacket += OnReceivedPacket; }