private void Reply(PacketContext context) { Debug.WriteLine("[Reply]"); foreach (var file in Directory.GetFiles(this._directory)) { var packets = PacketHelper.Frame(HeaderContainer.FolderFile, Encoding.ASCII.GetBytes(Path.GetFileName(file))); foreach (var pa in packets) { context.Reply(pa); } //file end context.Reply(PacketHelper.Frame(HeaderContainer.FolderFileEnd, new List <Byte> { 0x00 }).First()); } //context.Reply(PacketHelper.Frame(HeaderContainer.FolderFileFinalEnd, new List<Byte> { 0x00 }).First()); }