Skip to content
Daniel Stenberg edited this page Apr 3, 2024 · 25 revisions

WebSockets in libcurl

For a long time people have expressed wishes and ideas about getting WebSockets support added to curl. Every year in the annual survey a large portion of users say they'd like it.

Sponsored by Corellium

Specs

Aim for what's used

WebSockets is highly extensible. This described API and first implementation do not aim to support all existing and future extensions. But we should not write the API or implementation to necessarily prevent us from implementing and providing support for more extensions in a future.

We should support basic WebSockets and the "common" existing extensions to make this WebSockets support usable for most use cases.

The curl tool

Due to it being a transport for anything, it isn't ideal for the command line tool. It could possibly be made to work like TELNET does:

  • read from stdin and pass it on to the server
  • send data from server to stdout

Makes it work similar to 'nc'.