Example #1
0
        public ClientNetwork([NotNull] NetworkConfiguration configuration, RSAParameters rsaParameters) : base(
                configuration
                )
        {
            Guid = Guid.Empty;

            IsConnected    = false;
            IsServerOnline = false;

            mLidgrenInterface                       = new LidgrenInterface(this, typeof(NetClient), rsaParameters);
            mLidgrenInterface.OnConnected          += HandleInterfaceOnConnected;
            mLidgrenInterface.OnConnectionApproved += HandleInterfaceOnConnectonApproved;
            mLidgrenInterface.OnConnectionDenied   += HandleInterfaceOnConnectonDenied;
            mLidgrenInterface.OnDisconnected       += HandleInterfaceOnDisconnected;
            AddNetworkLayerInterface(mLidgrenInterface);
        }