[Libwebsockets] Android websocket client library

Thomas Spitz thomas.spitz at hestia-france.com
Wed May 11 19:53:23 CEST 2016


Hello everyone,

This is not really a question regarding libwebsockets but maybe someone as
info...
I am using library "project tyrus" for Android (v1.12) and for java
desktop. The java desktop version works perfectly but android version has
some problems. Here are the problem:
- It doesn't work at all with Android version 5.0  because of SSL (it is
apparently known by project tyrius developers and will be corrected) : Here
the log of lws:

> lwsts[1186]: accepted new conn  port 57692 on fd=21
> lwsts[1186]: Accepted 0xaea3a8 to tsi 0
> lwsts[1186]: lws_adopt_socket: new wsi 0xaea3a8
> lwsts[1186]: insert_wsi_socket_into_fds: 0xaea3a8: tsi=0, sock=21,
> pos-in-fds=2
> lwsts[1186]: inserted SSL accept into fds, trying SSL_accept
> lwsts[1186]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> lwsts[1186]: SSL_ERROR_WANT_READ
> lwsts[1186]: SSL_accept failed 2 / error:00000002:lib(0):func(0):system lib
> lwsts[1186]: SSL_ERROR_WANT_READ
> lwsts[1186]: SSL_accept failed 5 / error:00000005:lib(0):func(0):DH lib
> lwsts[1186]: SSL_accept failed skt 21: error:00000005:lib(0):func(0):DH lib
> lwsts[1186]: lws_close_free_wsi: shutting down connection: 0xaea3a8
> lwsts[1186]: SSL_accept failed 5 / error:00000005:lib(0):func(0):DH lib
> lwsts[1186]: SSL_accept failed skt 21: error:00000005:lib(0):func(0):DH lib
> lwsts[1186]: lws_close_free_wsi: real just_kill_connection: 0xaea3a8
> lwsts[1186]: remove_wsi_socket_from_fds: wsi=0xaea3a8, sock=21, fds pos=2,
> end guy pos=3, endfd=0
> lwsts[1186]: not calling back closed mode=6 state=0
> lwsts[1186]: lws_header_table_detach: wsi 0xaea3a8: ah (nil) (tsi=0, count
> = 0)
> lwsts[1186]: lws_free_wsi: 0xaea3a8, remaining wsi 1

 - it works partially with Android versions 5.1 and 6.0 : When
libwebsockets has to send small files (eg: 300kB files sent by trunks of
2055bytes), it sometimes work and sometimes doesn't. Apparently this is due
to libwebsockets high speed for sending trunks because it works much better
if I trigger max lws log level (1023)

What is working:
- it works perfecly with Android version 4.x
- it works perfecly with all Android versions if SSL is not activated


Other android libs seem much more complex. Does anyone have exeperience
with other Android client libraries?

For your info, I use version 1.7.7 of lws and openssl 1.0.2d

Thanks in advance
Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160511/a9c3b782/attachment.html>


More information about the Libwebsockets mailing list