FileFind.Meshwork.LocalNodeConnection.RaiseConnectionReady C# (CSharp) Méthode

RaiseConnectionReady() private méthode

private RaiseConnectionReady ( ) : void
Résultat void
        internal void RaiseConnectionReady()
        {
            connectionState = ConnectionState.Ready;

            LoggingService.LogInfo("Connection to {0} is ready.", this.NodeRemote.NickName);

            if (ConnectionReady != null)
                ConnectionReady(this);

            Ping();
        }

Usage Example

Exemple #1
0
        internal void ProcessReadyMessage(LocalNodeConnection connection, Node messageFrom)
        {
            if (connection.ConnectionState != ConnectionState.Ready)
            {
                connection.NodeRemote.RemotelyUntrusted = false;
                connection.ConnectionState = ConnectionState.Ready;
                connection.RaiseConnectionReady();
                connection.RemoteNodeInfo.LastConnected = DateTime.Now;
                Core.Settings.SyncNetworkInfoAndSave();

                if (connection.ReadySent == false)
                {
                    connection.SendReady();
                }

                if (messageFrom.FinishedKeyExchange == false &&
                    messageFrom.SentKeyExchange == false)
                {
                    messageFrom.CreateNewSessionKey();
                }

                // The network needs to know about me this new connection,
                // any nodes I know about, memos, etc... so say hi to
                // everyone and let them know everything that I know.
                Message message = network.MessageBuilder.CreateHelloMessage();
                message.To = Network.BroadcastNodeID;
                network.SendBroadcast(message);
            }
            else
            {
                // XXX: Do we need this?
                if (connection.ReadySent == false)
                {
                    connection.SendReady();
                }
            }
        }
All Usage Examples Of FileFind.Meshwork.LocalNodeConnection::RaiseConnectionReady