1.3 创建servers 并且绑定地址
代码片段
/* create servers and bind the address: svc://service_name */
for (int i = 1; i < argc; ++i)
{
std::string server_name = argv[i];
std::string url(FDB_URL_SVC);
url += server_name;
server_name += "_server";
auto server = new CMediaServer(server_name.c_str(), worker_ptr);
server->enableWatchdog(true);
server->enableUDP(true);
server->bind(url.c_str());
}
|