Пример #1
0
        public void ConnectToServer(Mule.ED2K.ED2KServer toconnect, bool multiconnect, bool bNoCrypt)
        {
            if (!multiconnect)
            {
                StopConnectionTry();
                Disconnect();
            }
            IsConnecting    = true;
            IsSingleConnect = !multiconnect;

            ServerSocket newsocket =
                MuleApplication.Instance.NetworkObjectManager.CreateServerSocket(this, !multiconnect);

            openSockets_.Add(newsocket);
            newsocket.ConnectTo(toconnect, bNoCrypt);
            connectionAttemps_[MpdUtilities.GetTickCount()] = newsocket;
        }