saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

Seeking support for http broadcasts #120

Open in0finite opened 1 month ago

in0finite commented 1 month ago

I would like to add seeking support for http broadcasts. While connected, it would be possible to seek backwards (to beginning of broadcast ?), and then forwards up to latest received tick.

There are no CDemoFullPackets in http broadcasts, so not sure how it would work.

I see there is /full endpoint, but it only delivers CDemoPacket. Is that good enough to restore full snapshot ?

/full endpoints could be enumerated by periodically calling /sync.

Do you maybe have some ideas how this could be implemented ?

in0finite commented 1 month ago

Ok, I just realized how it works : every fragment has it's own /full and /delta packets. So this is perfectly seekable. The only question is, can DemoParser be restored from /full fragment ?