Send and receive binary data over web sockets in Javascript?

后端 未结 4 1960
情话喂你
情话喂你 2020-12-04 14:37

It is possible to send and receive binary data over web sockets in Javascript? Could I, for example, implement an SSH client using web sockets?

4条回答
  •  死守一世寂寞
    2020-12-04 15:02

    One good and safe way to send and receive binary data is with base64 or base128 (where 128 has just 1/7 overhead instead of 1/3).

    Yes an SSH Client is possible.

    A proof for this is that there are already a lot of solutions out there that run in common browsers, but most of them still needs a custom server side implementation. You can look here for more information: http://en.wikipedia.org/wiki/Web-based_SSH

提交回复
热议问题