curl-library
Re: librtmp support
Date: Sun, 02 May 2010 08:14:07 -0700
Daniel Stenberg wrote:
> On Sat, 1 May 2010, Howard Chu wrote:
>
>> I started looking into adding librtmp to libcurl
>
> Whoa, that sounds awesome! Cool.
>
> Which librtmp is this? I googled for it but it wasn't clear to me if there's
> just one or if they are many.
>> I have a few concerns about the library structure. E.g.
>
>> +#define CURLPROTO_RTMP (1<<19)
>> +#define CURLPROTO_RTMPT (1<<20)
>> +#define CURLPROTO_RTMPE (1<<21)
>> +#define CURLPROTO_RTMPTE (1<<22)
>> +#define CURLPROTO_RTMPS (1<<23)
>
> This looks... special. What's the need for adding RTMP as five protocols?
Well, it has at least those 5 URL schemes in common use. I assumed I needed
one per scheme. rtmp:// is the plain protocol of course. rtmpt is a special
variant tunneled in HTTP. rtmpe is Adobe's version of encrypted rtmp (I
hesitate to use the word "secure" since it clearly isn't...), rtmpte is rtmpe
inside the HTTP tunnel. rtmps is rtmp inside an https tunnel. (So technically
it ought to be "rtmpts" but Adobe just calls it rtmps.)
I'd like to try to avoid the one-shot approach used by the ldap handler, but
I'm not sure how to fit into the Transfer() processing. RTMP is, like LDAP, a
binary message-based protocol. We can't just setup the connection and then let
Curl_readwrite() / readwrite_data() pass the data straight from the socket to
Curl_client_write(). It looks like read/write callbacks can be set by the
calling application, but not by the protocol handler. Or did I miss something
obvious there?
Speaking of the ldap handler - I can't imagine that it actually gets much use.
Does it? It wouldn't take me much effort to restructure it to be slightly more
multi-friendly. Could at least break apart the result parsing loop. With a
recent OpenLDAP library we could even delegate all of the connection setup to
curl, and use its SSL setup instead of ours. (But I'll save that for another
email thread, if it's worth pursuing.)
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/ ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-05-02