socket.io-client-java icon indicating copy to clipboard operation
socket.io-client-java copied to clipboard

how to send image? and how to server receive the image?

Open AnswerNo2 opened this issue 7 years ago • 3 comments

how to send image? and how to server receive the image?

AnswerNo2 avatar Dec 21 '18 01:12 AnswerNo2

上传到文件服务器 socket传递连接

a1134788957 avatar Dec 25 '18 02:12 a1134788957

尴尬了,兄弟,你也是中国人啊,被识别出来了。。。

AnswerNo2 avatar Dec 25 '18 02:12 AnswerNo2

if you want to have the data encoded and use general wss, you might encode it with bas64 e.g.:

var data_base64 = new Buffer(fs.readFileSync(FILE_PATH, "binary"), "binary").toString('base64');

this is just a quick general solution, the other way would be using a direct buffered stream with 'socket.io-stream'

--- issue should be closed

Krypt0n avatar May 06 '19 09:05 Krypt0n