Let me take a look at this again and see if anything can be done.
Yes, that’s how it is supposed to work:
Let me take a look at this again and see if anything can be done.
Yes, that’s how it is supposed to work:
But then there is confusion. Through the simulator headers = ws / wss / nil.
And through html always = binary
Yes, I understand the confusion. This is how it works:
Hello!
What about support of arm64-android platform for this extension? There are problem with defold-luasec dependency.
This is about another extension (defold-luasec), perhaps it’s possible to enable issues on that fork, @britzl?
I checked my server returns in the headers “binary” too. But crash happens anyway
even has time to accept the message, but breaks off
That is, with a handshake, everything is fine! But when receiving a message = crash
I’ve released a new version of luasec with openssl compiled for arm-64: https://github.com/britzl/defold-luasec/releases/tag/1.1.0
Strange. @selimanac and @endel have you been able to connect from an HTML5 Defold client to a Colyseus server?
I just build tic-tac example as html5 and test it on my local environment. Seems like it is working. To be honest, I didn’t understand the problem here.
The Colosseum transmits binary data. That is why it works. And I pass in all my projects = string (json), like most of the developers who use web sockets.
Is it possible to somehow choose other data types? Web socket capabilities are limited in this view.
my:
Pleaaaaaase, add select type
I have exact same issue! Any way to fix it?
No
Remind me again. What is the problem here? What do you mean by “type” in the context of a WebSocket?
Websockets can take two types, but in this implementation you can send/put only binary data.
In android / ios / simulator - two types
in hmtl5 - only binary!
Really needed: STRING!
Can you provide some documentation? Is this the Sec-WebSocket-Protocol header?
In my example provided with defold-websocket I passed the wrong data to ws_protocol. I took a look at the code yesterday and made a minor change to handle this properly:
With this change all but the HTML5 platform allows you to define whatever value to Sec-WebSocket-Protocol in the second argument to self.ws:connect(url, [ws_protocol], [sslparams])
.
In HTML5 builds the whole websocket setup is done by Emscripten in which case the Sec-WebSocket-Protocol is always binary. I have an idea to not use Emscripten and sockets and instead immediately use JavaScript to create the websocket.
The thing I do not understand still is why? I’m thinking that with the type set to binary
you would be able to pass any kind of data. Strings are after all bytes right?
I thought so too, but it’s not. Socket breaks
It’s cool idea!
I worked with sockets on corona sdk in html including. It was done on pure JS
Is there a chance for me to play around and try to connect against a server where there’s a crash when sending and receiving data?
Made for the test. Send any text and it returns in a second
wss://lost.webday.ru/britzl_test99