コード例 #1
0
        /// <summary>
        /// We've just gotten an ok from the remote end for our request to send them a file.
        /// Add the InbandByteStream service to received the file and set our state accordingly
        /// </summary>
        /// <param name="trans"></param>
        internal void StartNewReceiveStream(FileTransfer trans)
        {
            if (trans.FileTransferType == FileTransferType.IBB)
            {
                trans.ByteStreamLogic = new InbandByteStreamLogic(XMPPClient, trans);
            }
            else
            {
                trans.ByteStreamLogic = new SOCKS5ByteStreamLogic(XMPPClient, trans);
            }

            XMPPClient.AddLogic(trans.ByteStreamLogic);
            trans.ByteStreamLogic.StartAsync();
        }