How to exactly use Protocol Module?


This question seems a little bit stupid, but I really can not figure out how to use this module just by reading the docs here:

It looks like missing a lot of informtion about this topic.
I am asking this because I am trying to solve a porblem described here:

I searched the discuss topics and found a lot of fellows said they don’t know how to use Protocol module, I hope someone from the Electron team can help to make a better API and some demo codes to common needs.