-
Notifications
You must be signed in to change notification settings - Fork 53
fix tcp read unstable stuck #25
base: master
Are you sure you want to change the base?
Conversation
Can you explain your logic here? You're calling I find that not calling |
fix the same issue on android as @mcelrath at #27 .
|
I found the bug with steam corruption in the master branch, without your patch. AFAICT it is not necessary to call `readyToRead` at all on Android. (At least, my patch without it works perfectly) Why do you call it?
…On March 4, 2017 10:24:26 AM EST, cs8425 ***@***.***> wrote:
fix the same issue on android as @mcelrath at #27 .
`exec(null, readyToRead, 'ChromeSocketsTcp', 'readyToRead',
[socketId])`
Call js function `readyToRead` only when `exec` **failed**, not twice
for each packet.
Just make sure native `readyToRead` will be called once.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#25 (comment)
!DSPAM:58badc35191181728019888!
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
@mcelrath ps. make sure the code has been updated, check by unzip the output apk file. |
Try my patch... I am able to read and write...
…On March 5, 2017 10:47:31 AM EST, cs8425 ***@***.***> wrote:
@mcelrath
If not call native `readyToRead`,
nio will never go to read any new data from socket,
but you still can sent data (can write, can't read).
You can try it on a bidirectional, keep sending tcp socket, then you
will know what I said.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#25 (comment)
!DSPAM:58bc331c63431952020848!
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
@mcelrath app source: https://github.com/cs8425/tcp-test-app |
Yes, that's intended. The fix is entirely in sockets.tcp.js... Just diff it.
…On March 7, 2017 2:31:39 PM EST, cs8425 ***@***.***> wrote:
@mcelrath
your patch can't work...
only signature and
`/assets/www/plugins/cordova-plugin-chrome-apps-sockets-tcp/sockets.tcp.js`
are different.
you can unzip/disassembling apk file to check it.
app source:
[https://github.com/cs8425/tcp-test-app](https://github.com/cs8425/tcp-test-app)
pre-build apk
mine: [google
drive](https://drive.google.com/file/d/0B-ud10kmI-kSS0d3czNyRE9wQ00/view?usp=sharing)
your: [google
drive](https://drive.google.com/file/d/0B-ud10kmI-kSRVFOYVlDUndaeWM/view?usp=sharing)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#25 (comment)
!DSPAM:58bf0aa3211331626613455!
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
fix tcp read sometimes stuck on android platform.
cause by sometimes
sendReceiveEvent()
are un-ordered.