开发者

Can we send xml file through web socket

开发者 https://www.devze.com 2023-03-31 14:29 出处:网络
I have read somewhere in google that we can\'t send files through web sockets but I also read that websockets are using TCP. So I want to ask what had I misunderstood and is there a way to send file开

I have read somewhere in google that we can't send files through web sockets but I also read that websockets are using TCP. So I want to ask what had I misunderstood and is there a way to send file开发者_运维技巧 through web socket.


File uploads should be possible through websockets, at least in html5. One ready-made library which provides some basic functionality is Water under Ice.

There's an article on Changelog about it, go and read it.


Yes it is possible. You can read file system using File API, then get resulting data to Javascript array/string and then put this content to a websocket message.

0

精彩评论

暂无评论...
验证码 换一张
取 消