flow icon indicating copy to clipboard operation
flow copied to clipboard

WebSocket encodedecode

Open KangGeunSu opened this issue 6 years ago • 9 comments

Hello, When a message is received from the client, it is encodeURIComponent.

So I added to my config.

default_websocket_encodedecode	   :	false

Data comes in well.

but...The component settings window does not open.

KangGeunSu avatar Jan 08 '20 08:01 KangGeunSu

  • which version of Total.js do you use?
  • what type of browser + version do you use?
  • what OS do you use?
  • do you use some antivirus or proxy?

petersirka avatar Jan 08 '20 09:01 petersirka

Total.js versionis 3.3.0 browser is chrome 79.0.3945.79 my OS is Ubuntu 18.04.3 LTS Do not use.

KangGeunSu avatar Jan 08 '20 09:01 KangGeunSu

image Click to send the data.

flow version is 6.1.4 It is just encoded.

KangGeunSu avatar Jan 08 '20 09:01 KangGeunSu

Sorry, I read badly your question :-D

default_websocket_encodedecode is very important for UTF-8 characters, you need to enable it. Flow uses j-WebSocket component and the component encodes all data via encodeURIComponent and decodes all received data via decodeURIComponent.

Why did you disable it?

petersirka avatar Jan 08 '20 09:01 petersirka

I use a websocket Server component

When another client (arduino, Small products, etc.) receives a message, it has to decode the received message again.

KangGeunSu avatar Jan 08 '20 09:01 KangGeunSu

You can create another connection to another client via https://docs.totaljs.com/latest/en.html#api~WebSocketClient

petersirka avatar Jan 08 '20 10:01 petersirka

Clinet is not Total.js Client is Micro board(Commercial equipment) Does not support.. OTL...

Many modifications create components separately.

Total.js is really the best framework! Thank you very much.

KangGeunSu avatar Jan 08 '20 10:01 KangGeunSu

Total.js is really the best framework! Thank you very much.

KangGeunSu avatar Jan 08 '20 10:01 KangGeunSu

Thank you very much!

petersirka avatar Jan 08 '20 11:01 petersirka