sender.cs
来自「破解的飞信源代码」· CS 代码 · 共 31 行
CS
31 行
namespace Imps.Client.Core.P2P.AsyncTransportor
{
using Imps.Client.Core;
using Imps.Client.Core.P2P.FileTransportor;
using Imps.Client.Core.P2P.ICE;
using NCindy.Session.AIO;
using System;
public class Sender : TranBase
{
public Sender(PunchingResult result, TransportingFile file) : base(result, result.Remote, file)
{
base.session = new AsyncUDTSession(result.Local.FirstEndPoint, result.Remote.FirstEndPoint, true);
if (!base.session.Open().Complete())
{
throw new FileTransportException("Open inner session failed.");
}
base.tranportor = new FileSender(base.session, base.remotePeer, base.targetFile);
}
public override void Pause()
{
}
public override void Resume()
{
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?