| 37 | } |
| 38 | |
| 39 | IProtocol* Protocol(const TStringBuf& proto) override { |
| 40 | const_iterator it = find(proto); |
| 41 | |
| 42 | if (it == end()) { |
| 43 | ythrow yexception() << "unsupported scheme " << proto; |
| 44 | } |
| 45 | |
| 46 | return it->second; |
| 47 | } |
| 48 | |
| 49 | void Register(IProtocol* proto) override { |
| 50 | (*this)[proto->Scheme()] = proto; |
no test coverage detected