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.
精彩评论