| 120 | } |
| 121 | |
| 122 | void SrtConfigurePost(SRTSOCKET socket, map<string, string> options, vector<string>* failures) |
| 123 | { |
| 124 | vector<string> dummy; |
| 125 | vector<string>& fails = failures ? *failures : dummy; |
| 126 | |
| 127 | for (const auto &o: srt_options) |
| 128 | { |
| 129 | if ( o.binding == SocketOption::POST && options.count(o.name) ) |
| 130 | { |
| 131 | string value = options.at(o.name); |
| 132 | Verb() << "Setting option: " << o.name << " = " << value; |
| 133 | bool ok = o.apply<SocketOption::SRT>(socket, value); |
| 134 | if ( !ok ) |
| 135 | fails.push_back(o.name); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |