New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android can not recieve message #251
Comments
ndk version is 21b |
Given that you are on Android, you need to specify a cacert, I think that's your problem.
Check this out
https://machinezone.github.io/IXWebSocket/usage/#tls-support-and-configuration
… On Nov 16, 2020, at 6:06 AM, shiliupingGitHub ***@***.***> wrote:
ndk version is 21b
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UPFOKJGFO4ILB3WYV3SQEWXJANCNFSM4TXAN7MA>.
|
I set cafile = NONE , It works well on windows. on android It looks like the function "poll" does not work. it always return -1. maybe ndk problem? |
just work for the client side |
poll should work fine on Android as well, it was working with earlier version of ixwebsocket for sure.
returning -1 is ok everyone in a while / have you printed the error messages ?
… On Nov 16, 2020, at 7:14 AM, shiliupingGitHub ***@***.***> wrote:
I set cafile = NONE , It works well on windows. on android It looks like the function "poll" does not work. it always return -1. maybe ndk problem?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UI65XL2CX7ZEQ4WV6LSQE6W7ANCNFSM4TXAN7MA>.
|
yes , errorno value is 4, It means system call interrupt . I don't know why . I just guess it was ndk problem |
Ah that's interesting.
Usually when the errno is this value, the function needs to be called again. I never ran into this before.
… On Nov 16, 2020, at 7:31 AM, shiliupingGitHub ***@***.***> wrote:
yes , errorno value is 4, It means system call interrupt . I don't know why . I just guess it was ndk problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6ULB6AJNUSBZOH4NB2DSQFAULANCNFSM4TXAN7MA>.
|
and also In your code , if the return value is -1, you will close the socket |
pytorch/pytorch#4220 <pytorch/pytorch#4220>
Maybe we need to have a thin wrapper that re-run the function a couple of times (not sure how many times) like they do here if the return value is system call interrupt.
… On Nov 16, 2020, at 7:31 AM, shiliupingGitHub ***@***.***> wrote:
yes , errorno value is 4, It means system call interrupt . I don't know why . I just guess it was ndk problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6ULB6AJNUSBZOH4NB2DSQFAULANCNFSM4TXAN7MA>.
|
emm ,I makes a loop to wrap this , it looks like return -1 forever . so what version ndk have you tested before |
Can you try this ?
$ git diff IXNetSystem.cpp
diff --git a/ixwebsocket/IXNetSystem.cpp b/ixwebsocket/IXNetSystem.cpp
index 195d129..02c9cd3 100644
--- a/ixwebsocket/IXNetSystem.cpp
+++ b/ixwebsocket/IXNetSystem.cpp
@@ -105,7 +105,15 @@ namespace ix
return ret;
#else
- return ::poll(fds, nfds, timeout);
+ // We follow the style from libuv
+ int ret = -1;
+ do
+ {
+ ret = ::poll(fds, nfds, timeout);
+ }
+ while (ret == -1 && errno == EINTR)
+
+ return ret;
#endif
}
… On Nov 16, 2020, at 7:31 AM, shiliupingGitHub ***@***.***> wrote:
yes , errorno value is 4, It means system call interrupt . I don't know why . I just guess it was ndk problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6ULB6AJNUSBZOH4NB2DSQFAULANCNFSM4TXAN7MA>.
|
Hum I don't really remember, 19, 20 I believe.
… On Nov 16, 2020, at 7:31 AM, shiliupingGitHub ***@***.***> wrote:
yes , errorno value is 4, It means system call interrupt . I don't know why . I just guess it was ndk problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#251 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6ULB6AJNUSBZOH4NB2DSQFAULANCNFSM4TXAN7MA>.
|
@tiwariashish86 would know better about ndk versions ... Hi Ashish ! |
emm . I will use another vesion ndk to test. thank you very much |
int ret = -1;
I have tested , this code solve my problem , thx |
Great. I have released that fix in the latest version of the library. |
v11.0.4 |
I make a dll for unity3d , It works fine on windows , But Not ok on android . the url is "wss://xxxx:“。 ” , I track the code, final I get the error in the "IXNetSystem.cpp" ::poll(fds, nfds, timeout); the function always return -1 and the errorno is alaways 4. how can I fixed , forgive my pool english
The text was updated successfully, but these errors were encountered: