我的问题是,当客户端调用服务器上的方法以获取具有特定位置的流时,流每次都带有 position = 0。
我能做些什么?
服务器方式:
public Stream SearchTorrent(int TorrentID, int Position)
{
string FilePatch = ClientBusinessLogic.MyTorrents().Where((MyTorrent1) => MyTorrent1.TorrentID == TorrentID).ToList().First().Patch;
Stream File = new FileStream(FilePatch, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
File.Position = Position;
return File;
}
客户端方法:
Stream SeederFile = this.SeederInterface.SearchTorrent(TorrentID, Part.From);
Part.From 值不是 0。但是返回的流以位置 vlaue 0 返回。