MCPcopy Create free account
hub / github.com/Haivision/srt / importStringOption

Function importStringOption

srtcore/group.cpp:510–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508/// A function template to import a StringStorage option.
509template <size_t N>
510static 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

Callers 1

deriveSettingsMethod · 0.85

Calls 5

ConfigItemClass · 0.85
c_strMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected