| 508 | /// A function template to import a StringStorage option. |
| 509 | template <size_t N> |
| 510 | static void importStringOption(vector<CUDTGroup::ConfigItem>& storage, SRT_SOCKOPT optname, const StringStorage<N>& optval) |
| 511 | { |
| 512 | if (optval.empty()) |
| 513 | return; |
| 514 | |
| 515 | // Store the option when: |
| 516 | // - option has a value (default is empty). |
| 517 | #if HAVE_FULL_CXX11 |
| 518 | storage.emplace_back(optname, optval.c_str(),(int) optval.size()); |
| 519 | #else |
| 520 | storage.push_back(CUDTGroup::ConfigItem(optname, optval.c_str(), (int) optval.size())); |
| 521 | #endif |
| 522 | } |
| 523 | |
| 524 | // This function is called by the same premises as the CUDT::CUDT(const CUDT&) (copy constructor). |
| 525 | // The intention is to rewrite the part that comprises settings from the socket |
no test coverage detected