Skip to content

Websocket support in Easy APIs / curl-sys #579

@frextrite

Description

@frextrite

I am exploring usage of websockes with curl-rust and looking for pointers on the same. Specifically I'm trying out the connect only model mentioned in libcurl documentation.

But from the looks of it curl::easy::connect_only(enable: bool) does not allow settings an integer value (specifically 2 in case of Websockets).

Since the high-level Easy2 APIs didn't support this, I explored the lower-level curl-sys ffi APIs which do support this even though it looks like I'm reinventing the wheel and using a lot of unsafe rust. On exploring further I wasn't able to find the core websockets functions - curl_ws_recv and curl_ws_send in curl-sys even though it is based on libcurl 8.10.1 which definitely supports these APIs.

Am I missing any configuration to enable the usage of curl_ws_recv and curl_ws_send functions or is it something that is currently not supported by the crate?

Edit: README mentions the bindings are developed using curl 7.24.0 but the latest package references libcurl 8.10.1. What gives?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions