Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Expose adb pull interface #10

Merged
merged 1 commit into from
Sep 26, 2014
Merged

Expose adb pull interface #10

merged 1 commit into from
Sep 26, 2014

Conversation

weideng
Copy link
Contributor

@weideng weideng commented Sep 25, 2014

@jryans
Do you have time take a look?
The patch is finished yesterday and I have tested it this morning, pulling some normal files(pictures, videos, musics) from mobile to desktop, it seems work very well.

case "start":
state = "send-transport";
runFSM();
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Use semicolon after break. Check the other instances of this too.

@jryans
Copy link
Contributor

jryans commented Sep 25, 2014

It'll take me a bit of time to look over the core algorithm... there's a lot going on there! Hoping to check it out later today.

@weideng
Copy link
Contributor Author

weideng commented Sep 25, 2014

OK, wait for your feedback. Thanks for your patience.

@weideng
Copy link
Contributor Author

weideng commented Sep 25, 2014

The pull request has been updated, add some semicolons and some comments.

remaining = fileSize;
fileData = new Uint8Array(new ArrayBuffer(fileSize));
currentPos = 0;
remainingPkgData = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this more like receivedData not "remaining" data? It's all the chunks we've received so far, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. When received a socket package, it maybe contain many chunks, often partial chunk at the end.
So, just handle full chunks and keep partial chunk in remainingPkgData, then combine it with next socket data.

@weideng
Copy link
Contributor Author

weideng commented Sep 26, 2014

@jryans The pull request has been updated, improved core algorithm, do you have time take a look? Thanks a lot.

@jryans
Copy link
Contributor

jryans commented Sep 26, 2014

Great! It appears to work well. Thanks for working on this!

jryans added a commit that referenced this pull request Sep 26, 2014
Expose adb pull interface
@jryans jryans merged commit b7e3587 into mozilla:master Sep 26, 2014
@weideng
Copy link
Contributor Author

weideng commented Sep 26, 2014

Thanks for your high efficent review :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants