ratchet websocket send input type=file

282 views
Skip to first unread message

Расул Хуров

unread,
May 14, 2015, 11:04:45 PM5/14/15
to ratch...@googlegroups.com
Hello, help me please, is it possible to transfer files from Rachet example ($ws->send ("INPUT type="file")), and if so, how? If not then what the solution is? Thank you in advance.

cboden

unread,
May 16, 2015, 12:13:40 AM5/16/15
to ratch...@googlegroups.com, rasl...@gmail.com
Not quite. WebSockets offer a text or two different binary transfer types in send(). You could pass the contents of a file through the WebSocket in binary transfer mode. Ratchet's protocol handlers support binary transfer but the API doesn't yet (in 0.4 it will). If you dig through the source code you could figure out how to accept binary messages in your app though. 
Reply all
Reply to author
Forward
0 new messages