Re: Libcurl and WebSockets

2025-01-28 Thread Daniel Stenberg via curl-library
On Mon, 27 Jan 2025, Gavin D. Howard via curl-library wrote: I presume that you need a way to hook libcurl into a WebSocket connection in the server after it has been setup by the client, or something like that. How would that work? However, after thinking it through, since the option is set t

Re: Libcurl and WebSockets

2025-01-27 Thread Gavin D. Howard via curl-library
> > After rereading RFC 6455, and looking at the Curl Websocket API, I think > > that the only API change would be to add something like `CURLWS_SERVER` to > > `CURLOPT_WS_OPTIONS`. > > As the entire libcurl API is for client-side, I'm not following how you would > make it act as a server just beca

Re: Libcurl and WebSockets

2025-01-21 Thread Daniel Stenberg via curl-library
On Mon, 20 Jan 2025, Gavin D. Howard via curl-library wrote: After rereading RFC 6455, and looking at the Curl Websocket API, I think that the only API change would be to add something like `CURLWS_SERVER` to `CURLOPT_WS_OPTIONS`. As the entire libcurl API is for client-side, I'm not followin

Re: Libcurl and WebSockets

2025-01-20 Thread Gavin D. Howard via curl-library
> It is a continued conversation because I can't quite understand how the API > you speak of would work. You don't need any implementation for that, you can > just explain it. After rereading RFC 6455, and looking at the Curl Websocket API, I think that the only API change would be to add somethin

Re: Libcurl and WebSockets

2025-01-12 Thread Timothe Litt via curl-library
On 12-Jan-25 16:27, Gavin D. Howard via curl-library wrote: The problem with "limiting [an http server] to what you want" is that over time, the requirements will expand. Even if you think you know the limits won't change. They will, and the maintenance task that you - or your successor - will in

Re: Libcurl and WebSockets

2025-01-12 Thread Daniel Stenberg via curl-library
On Sun, 12 Jan 2025, Gavin D. Howard via curl-library wrote: Exactly how would this new proposed look and work? I can't even fathom how an API for this would look like to be usable in a server setting. That is a good question, and I don't expect you to answer it. I will assume that asking the

Re: Libcurl and WebSockets

2025-01-12 Thread Gavin D. Howard via curl-library
> The problem with "limiting [an http server] to what you want" is that > over time, the requirements will expand. Even if you think you know > the limits won't change. They will, and the maintenance task that you > - or your successor - will inherit from the technical debt will > prevent you from

Re: Libcurl and WebSockets

2025-01-08 Thread Timothe Litt via curl-library
On 07-Jan-25 10:32, Daniel Stenberg via curl-library wrote: I've read the RFCs and just for HTTP 1.1, it seems simple enough to implement it if I break Postel's law and essentially only accept well-formatted HTTP requests, or requests as generated by browsers and libcurl. Would it be simple enoug

Re: Libcurl and WebSockets

2025-01-08 Thread Daniel Stenberg via curl-library
On Tue, 7 Jan 2025, Gavin D. Howard via curl-library wrote: However, I think the "client side only" part of libcurl is already dead, and I think that you were the one to kill it. The reason I think so is your own advice to not mix URL parsers I previously mentioned. [2] Okay, that is one way

Re: Libcurl and WebSockets

2025-01-07 Thread Gavin D. Howard via curl-library
> > I was wondering if the server portion of WebSockets could be implemented > > minus the upgrade. I'd love to do it myself; would it be accepted if I did > > it up to the standards of the Curl project? > > I can't see how that is libcurl's business. My mantra for curl has always been > "client si

Re: Libcurl and WebSockets

2025-01-07 Thread Daniel Stenberg via curl-library
On Tue, 7 Jan 2025, Gavin D. Howard via curl-library wrote: I was wondering if the server portion of WebSockets could be implemented minus the upgrade. I'd love to do it myself; would it be accepted if I did it up to the standards of the Curl project? I can't see how that is libcurl's busines

Libcurl and WebSockets

2025-01-06 Thread Gavin D. Howard via curl-library
Hello, I am looking to use libcurl for a VCS. I will use the HTTP client and email protocols, as well as the URL parser on both ends because Daniel said so. [1] I also intend to use WebSockets, and one thing I noticed in the RFC is that WebSockets are more symmetrical than HTTP. In fact, after th