Support custom Version Parsers when protocol name is not HTTP#67
Support custom Version Parsers when protocol name is not HTTP#67tsnoam wants to merge 1 commit intoseanmonstar:masterfrom
Conversation
|
Sorry, I'm ignorant of RTSP. So, it's a protocol that looks just like HTTP/1, just with a different name? Are the multiple versions? I have a strong feeling like this is out of scope for the library, but I'm slightly intrigued at how simple the change looks... |
|
Hi @seanmonstar , RTSP looks exactly like HTTP, with the small difference that "RTSP" is written instead of "HTTP". I can see why you tend to think that this is out of scope for this library. However, there are several protocols out there which looks just like HTTP (recently i've become acquainted with SIP). Parsing these protocols using this library seems (at least to me) as the obvious thing (instead of reinventing the wheel / forking / etc.). I'm trying to think of a way to modify the library in a manner which will be more robust into different protocol names (this practically the only difference between the protocols). |
|
I'd love for something like this to be possible. Currently I'm using rtsparse which is basically just a fork with What would be awesome long term is setting this option when using hyper, or even warp, to be able to easily build servers for HTTP-esque protocols. |
|
@tsnoam how much dynamic dispatch will decrease performance? |
|
@prostomarkeloff v1.3.4 tag: tsnoam:master branch: |
|
the benchmarks were executed on my laptop: I tried to make the environment as "quiet" as possible, but you can never know if and what influenced the benches... |
|
There is now a |
In order to parse HTTP based protocol (like RTSP) for example, it is required to know what is the name of the protocol.