The only way to send the bitmap through the web socket is with base 64 encoding. A more efficient solution is to send a regular request (HttpJob.Download) from the client to download the image.
Thank you Erel.
I know (since your answer at that date
) that I should use a "http way", but I don't know how.
I need to exchange bitmaps between my b4j web socket server and b4a client; then, there is a web socket handler in my server, which receives also data to identify users.
As you know, there is a folder www, the only one accessible (hoping that hackers cannot access other folders
).
To send a file from server to client I could use ws to "force" the client to download a file (using ws I'm (pretty) sure che user is already authorized), so the client could use some code like this (from an example on site):
'Send a GET request
job3.Initialize("Job3", Me)
job3.Download("http://www.b4x.com/forum/images/categories/android.png")
but what the URL should be? And the file should be available only for that user and only at that time.
And I have no idea about the upload (client--> server).
The examples I found on site are for browsers, which use java stuff.
Thank you