这篇教程C++ DNSServiceProcessResult函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DNSServiceProcessResult函数的典型用法代码示例。如果您正苦于以下问题:C++ DNSServiceProcessResult函数的具体用法?C++ DNSServiceProcessResult怎么用?C++ DNSServiceProcessResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DNSServiceProcessResult函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ProcessDNSMessagesvoid ProcessDNSMessages() { static boolean initialized; if ( !initialized ) { initialized = true; DNSServiceErrorType err = DNSServiceBrowse ( &browseRef, 0, /* flags */ 0, /* interface */ serviceName, NULL, /* domain */ DNSServiceBrowseReplyCallback, NULL /* context */ ); if ( err != kDNSServiceErr_NoError ) { printf( "DNSServiceBrowse error/n" ); return; } } // poll the socket for updates int socket = DNSServiceRefSockFD( browseRef ); if ( socket <= 0 ) { return; } fd_set set; FD_ZERO( &set ); FD_SET( socket, &set ); struct timeval tv; memset( &tv, 0, sizeof( tv ) ); if ( select( socket+1, &set, NULL, NULL, &tv ) > 0 ) { DNSServiceProcessResult( browseRef ); } }
开发者ID:KoalaWarfare,项目名称:DOOM-IOS2,代码行数:35,
示例2: lockvoid CZeroconfWIN::ProcessResults(){ CSingleLock lock(m_data_guard); DNSServiceErrorType err = DNSServiceProcessResult(m_service); if (err != kDNSServiceErr_NoError) CLog::Log(LOGERROR, "ZeroconfWIN: DNSServiceProcessResult returned (error = %ld)", (int) err);}
开发者ID:2BReality,项目名称:xbmc,代码行数:7,
示例3: OW_Browse_Bonjour// Called in a threadstatic void * OW_Browse_Bonjour(void * v){ struct connection_in * in = v ; DNSServiceErrorType dnserr; DETACH_THREAD; MONITOR_RLOCK ; dnserr = DNSServiceBrowse(&in->master.browse.bonjour_browse, 0, 0, "_owserver._tcp", NULL, BrowseBack, NULL); if (dnserr != kDNSServiceErr_NoError) { LEVEL_CONNECT("DNSServiceBrowse error = %d", dnserr); MONITOR_RUNLOCK ; return VOID_RETURN ; } // Blocks, which is why this is in it's own thread while (DNSServiceProcessResult(in->master.browse.bonjour_browse) == kDNSServiceErr_NoError) { //printf("DNSServiceProcessResult ref %ld/n",(long int)rs->sref) ; continue; } DNSServiceRefDeallocate(in->master.browse.bonjour_browse); in->master.browse.bonjour_browse = 0 ; MONITOR_RUNLOCK ; return VOID_RETURN;}
开发者ID:M-o-a-T,项目名称:owfs,代码行数:26,
示例4: DNSServiceRefSockFDvoid AutoDiscoveryServerImpl::update(){ int dns_sd_fd = client ? DNSServiceRefSockFD(client ) : -1; int nfds = dns_sd_fd + 1; fd_set readfds; struct timeval tv; int result; // (dns_sd_fd2 > dns_sd_fd) nfds = dns_sd_fd2 + 1; // 1. Set up the fd_set as usual here. // This example client has no file descriptors of its own, // but a real application would call FD_SET to add them to the set here FD_ZERO(&readfds); // 2. Add the fd for our client(s) to the fd_set if (client ) FD_SET(dns_sd_fd , &readfds); //if (client_pa) FD_SET(dns_sd_fd2, &readfds); // 3. Set up the timeout. tv.tv_sec = 0; tv.tv_usec = 0; result = select(nfds, &readfds, (fd_set*)NULL, (fd_set*)NULL, &tv); if (result > 0) { DNSServiceErrorType err = kDNSServiceErr_NoError; if (client && FD_ISSET(dns_sd_fd , &readfds)) err = DNSServiceProcessResult(client );// else if (client_pa && FD_ISSET(dns_sd_fd2, &readfds)) err = DNSServiceProcessResult(client_pa);// if (err) { fprintf(stderr, "DNSServiceProcessResult returned %d/n", err); stopNow = 1; } }}
开发者ID:yueying,项目名称:osg,代码行数:32,
示例5: wxASSERTvoid * wxServiceDiscoveryTaskBase::wxServiceDiscoveryServiceHelperThread::Entry(){ // static wxCriticalSection section; // wxCriticalSectionLocker section_locker( section ); wxASSERT( ! wxThread::IsMain() ); bool cancel_running = false; DNSServiceErrorType err = kDNSServiceErr_NoError; do { err = DNSServiceProcessResult( m_ServiceRef ); if ( err ) { if ( err == kDNSServiceErr_Unknown ) { wxLogDebug( wxT("Received an unknown bonjour error, but this was probably just a method of quitting our thread.") ); } else { wxLogDebug( wxT("got error! %d"), err ); } cancel_running = true; } } while ( ! TestDestroy() && !cancel_running ); return NULL;}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:32,
示例6: DNSServiceResolvebool CZeroconfBrowserWIN::doResolveService(CZeroconfBrowser::ZeroconfService& fr_service, double f_timeout){ DNSServiceErrorType err; DNSServiceRef sdRef = NULL; err = DNSServiceResolve(&sdRef, 0, kDNSServiceInterfaceIndexAny, fr_service.GetName(), fr_service.GetType(), fr_service.GetDomain(), ResolveCallback, &fr_service); if( err != kDNSServiceErr_NoError ) { if (sdRef) DNSServiceRefDeallocate(sdRef); CLog::Log(LOGERROR, "ZeroconfBrowserWIN: DNSServiceResolve returned (error = %ld)", (int) err); return false; } err = DNSServiceProcessResult(sdRef); if (err != kDNSServiceErr_NoError) CLog::Log(LOGERROR, "ZeroconfBrowserWIN::doResolveService DNSServiceProcessResult returned (error = %ld)", (int) err); if (sdRef) DNSServiceRefDeallocate(sdRef); return true;}
开发者ID:A600,项目名称:xbmc,代码行数:26,
示例7: FD_ZERO ConnectionError Client::recv( int timeout ) { if( m_connection && m_connection->state() == StateConnected ) return ClientBase::recv( timeout ); else { if( !m_currentRef ) return ConnNoError; struct timeval tv; fd_set fds; FD_ZERO( &fds ); // the following causes a C4127 warning in VC++ Express 2008 and possibly other versions. // however, the reason for the warning can't be fixed in gloox. FD_SET( DNSServiceRefSockFD( m_currentRef ), &fds ); tv.tv_sec = timeout / 1000000; tv.tv_usec = timeout % 1000000; if( select( FD_SETSIZE, &fds, 0, 0, timeout == -1 ? 0 : &tv ) > 0 ) { if( FD_ISSET( DNSServiceRefSockFD( m_currentRef ), &fds ) != 0 ) DNSServiceProcessResult( m_currentRef ); } return ConnNoError; } }
开发者ID:crazyit,项目名称:iGame,代码行数:29,
示例8: DNSServiceProcessResultvoid ZeroconfBrowser::socketReadyRead(){ DNSServiceErrorType err = DNSServiceProcessResult(m_DnsServiceRef); if (err != kDNSServiceErr_NoError) { emit error(err); }}
开发者ID:donggeol,项目名称:OSjumper,代码行数:7,
示例9: register_service void register_service(DNSServiceRef service) { // Run until break. int dns_sd_fd = DNSServiceRefSockFD(service); fd_set readfds; struct timeval tv; int result; while (should_run()) { FD_ZERO(&readfds); FD_SET(dns_sd_fd, &readfds); tv.tv_sec = LONG_TIME; tv.tv_usec = 0; // highest fd in set + 1 result = select(dns_sd_fd+1, &readfds, (fd_set*)NULL, (fd_set*)NULL, &tv); if (result > 0) { DNSServiceErrorType err = kDNSServiceErr_NoError; // Execute callback if (FD_ISSET(dns_sd_fd, &readfds)) err = DNSServiceProcessResult(service); if (err) { // An error occured. Halt. fprintf(stderr, "DNSServiceProcessResult returned %d/n", err); quit(); } } else if (errno != EINTR) { // Error. fprintf(stderr, "ZeroConf error (%d %s)/n", errno, strerror(errno)); if (errno != EINTR) quit(); } } }
开发者ID:aspeteRakete,项目名称:oscit,代码行数:31,
示例10: _ptpip_enumeratestatic void_ptpip_enumerate ( DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *serviceName, const char *regtype, const char *replyDomain, void *context) { struct mdnsinfo mdnsi; DNSServiceRef sd; if (errorCode != kDNSServiceErr_NoError) { gp_log (GP_LOG_ERROR, "ptpip", "Error on _ptp._tcp query."); return; } gp_log (GP_LOG_DEBUG, "ptpip", "found %s, %s, %s", serviceName, regtype, replyDomain); mdnsi.list = context; mdnsi.name = serviceName; DNSServiceResolve (&sd, 0, interfaceIndex, serviceName, regtype, replyDomain, _ptpip_resolved, &mdnsi ); DNSServiceProcessResult (sd); DNSServiceRefDeallocate (sd);}
开发者ID:CastorGemini,项目名称:libgphoto2,代码行数:29,
示例11: _SocketCallBack/* static */ void_SocketCallBack(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void* data, void* info) { DNSServiceErrorType err; __CFNetServiceBrowser* browser = info; (void)s; // unused (void)type; // unused (void)address; // unused (void)data; // unused CFRetain(browser); // Dispatch to process the result err = DNSServiceProcessResult(browser->_browse); // If there was an error, need to infor the client. if (err) { // Dispatch based upon search type. if (browser->_domainSearch) _DomainEnumReply(browser->_browse, 0, 0, err, NULL, info); else _BrowseReply(browser->_browse, 0, 0, err, NULL, NULL, NULL, info); } CFRelease(browser);}
开发者ID:jmgao,项目名称:CFNetwork,代码行数:28,
示例12: assertbool MLNetServiceHub::pollService(DNSServiceRef dnsServiceRef, double timeOutInSeconds, DNSServiceErrorType &err){ assert(dnsServiceRef); err = kDNSServiceErr_NoError; fd_set readfds; FD_ZERO(&readfds); int dns_sd_fd = DNSServiceRefSockFD(dnsServiceRef); int nfds = dns_sd_fd+1; FD_SET(dns_sd_fd, &readfds); struct timeval tv; tv.tv_sec = long(floor(timeOutInSeconds)); tv.tv_usec = long(1000000*(timeOutInSeconds - tv.tv_sec)); int result = select(nfds,&readfds,NULL,NULL,&tv); if(result>0 && FD_ISSET(dns_sd_fd, &readfds)) { err = DNSServiceProcessResult(dnsServiceRef); return true; } return false;}
开发者ID:EQ4,项目名称:madronalib,代码行数:26,
示例13: socket_callback/* * CFRunloop callback that calls DNSServiceProcessResult() when * there's new data on the socket. */static voidsocket_callback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, const void *data, void *context){ struct cbinfo *info = context; DNSServiceErrorType err; if (callbackType == kCFSocketNoCallBack) { printf("socket_callback: kCFSocketNoCallBack?/n"); return; } if ((err = DNSServiceProcessResult(info->sdref)) != kDNSServiceErr_NoError) { printf("DNSServiceProcessResult() returned an error! %d/n", err); if (err == kDNSServiceErr_BadReference) { printf("bad reference?: %p, %d, %p, %p %p/n", s, (int)callbackType, address, data, context); return; } if ((context == &nfsinfo) || (context == &mountdinfo)) { /* bail if there's a problem with the main browse connection */ exit(1); } /* dump the troublesome service connection */ CFRunLoopRemoveSource(CFRunLoopGetCurrent(), info->rls, kCFRunLoopDefaultMode); CFRelease(info->rls); CFSocketInvalidate(info->sockref); CFRelease(info->sockref); DNSServiceRefDeallocate(info->sdref); free(info); }}
开发者ID:Leon555,项目名称:Mac-src-essentials,代码行数:34,
示例14: dlogLONGCSecondPage::OnServiceEvent(WPARAM inWParam, LPARAM inLParam){ if (WSAGETSELECTERROR(inLParam) && !(HIWORD(inLParam))) { dlog( kDebugLevelError, "OnServiceEvent: window error/n" ); } else { SOCKET sock = (SOCKET) inWParam; // iterate thru list ServiceRefList::iterator begin = m_serviceRefList.begin(); ServiceRefList::iterator end = m_serviceRefList.end(); while (begin != end) { DNSServiceRef ref = *begin++; check(ref != NULL); if ((SOCKET) DNSServiceRefSockFD(ref) == sock) { DNSServiceProcessResult(ref); break; } } } return ( 0 );}
开发者ID:HQarroum,项目名称:android-mdns,代码行数:31,
示例15: switchLRESULT CALLBACK wxServiceDiscoveryTaskBase::WndProc(HWND inWindow, UINT inMsg, WPARAM inWParam, LPARAM inLParam ) { LRESULT result; switch(inMsg) { case DNSSD_EVENT: // Process the DNS-SD event. All DNS-SD callbacks occur from // within this function. { void * ptr = GetProp( inWindow, PROPNAME ); wxServiceDiscoveryTaskBase * self = reinterpret_cast<wxServiceDiscoveryTaskBase *>( ptr ); if (DNSServiceProcessResult( self->m_rServiceRef ) != kDNSServiceErr_NoError) result = -1; else result = 0; } break; case WM_NCDESTROY: RemoveProp( inWindow, PROPNAME ); // fall through default: result = DefWindowProc(inWindow, inMsg, inWParam, inLParam); break; } return(result); }
开发者ID:stahta01,项目名称:wxCode_components,代码行数:34,
示例16: RegisterGameServiceboolean RegisterGameService() { DNSServiceErrorType err = DNSServiceRegister( &serviceRef, kDNSServiceFlagsNoAutoRename, // we want a conflict error InterfaceIndexForName( "en0" ), // pass 0 for all interfaces "iPhone Doom Classic", serviceName, NULL, // domain NULL, // host htons( DOOM_PORT ), 0, // txtLen NULL, // txtRecord DNSServiceRegisterReplyCallback, NULL // context ); if ( err != kDNSServiceErr_NoError ) { printf( "DNSServiceRegister error/n" ); } else { // block until we get a response, process it, and run the callback err = DNSServiceProcessResult( serviceRef ); if ( err != kDNSServiceErr_NoError ) { printf( "DNSServiceProcessResult error/n" ); } } return localServer;}
开发者ID:KoalaWarfare,项目名称:DOOM-IOS2,代码行数:27,
示例17: DNSServiceProcessResultvoid QZeroConfPrivate::browserRead(){ DNSServiceErrorType err = DNSServiceProcessResult(browser); if (err != kDNSServiceErr_NoError) { cleanUp(browser); emit pub->error(QZeroConf::browserFailed); }}
开发者ID:scientist-st,项目名称:QtZeroConf,代码行数:8,
示例18: HandleEventsstatic void HandleEvents(void){ int dns_sd_fd = client ? DNSServiceRefSockFD(client ) : -1; int dns_sd_fd2 = client2 ? DNSServiceRefSockFD(client2) : -1; int nfds = dns_sd_fd + 1; fd_set readfds; struct timeval tv; int result; if (dns_sd_fd2 > dns_sd_fd) nfds = dns_sd_fd2 + 1; while (!stopNow) { // 1. Set up the fd_set as usual here. // This example client has no file descriptors of its own, // but a real application would call FD_SET to add them to the set here FD_ZERO(&readfds); // 2. Add the fd for our client(s) to the fd_set if (client ) FD_SET(dns_sd_fd , &readfds); if (client2) FD_SET(dns_sd_fd2, &readfds); // 3. Set up the timeout. tv.tv_sec = timeOut; tv.tv_usec = 0; result = select(nfds, &readfds, (fd_set*)NULL, (fd_set*)NULL, &tv); if (result > 0) { DNSServiceErrorType err = kDNSServiceErr_NoError; if (client && FD_ISSET(dns_sd_fd , &readfds)) err = DNSServiceProcessResult(client ); else if (client2 && FD_ISSET(dns_sd_fd2, &readfds)) err = DNSServiceProcessResult(client2); if (err) { fprintf(stderr, "DNSServiceProcessResult returned %d/n", err); stopNow = 1; } } else if (result == 0) myTimerCallBack(); else { printf("select() returned %d errno %d %s/n", result, errno, strerror(errno)); if (errno != EINTR) stopNow = 1; } }}
开发者ID:jk-smartos,项目名称:illumos-joyent,代码行数:46,
示例19: Announce_Post_Registerstatic void Announce_Post_Register(DNSServiceRef sref, DNSServiceErrorType err){ if (err == kDNSServiceErr_NoError) { DNSServiceProcessResult(sref); } else { LEVEL_CONNECT("Unsuccessful call to DNSServiceRegister err = %d", err); }}
开发者ID:M-o-a-T,项目名称:owfs,代码行数:8,
示例20: DNSServiceProcessResultvoid BonjourBrowser::bonjourSocketReadyRead (){ DNSServiceErrorType err; err = DNSServiceProcessResult(d->dnssref); if (err != kDNSServiceErr_NoError) { setError(err); }}
开发者ID:kuro,项目名称:qtbonjour,代码行数:8,
示例21: debug/** * /brief Main method for the */void BonjourDiscovery::main() { debug(LOG_DEBUG, DEBUG_LOG, 0, "start thread"); assert(sdRef != NULL); int error; do { error = DNSServiceProcessResult(sdRef); } while (error == kDNSServiceErr_NoError); debug(LOG_DEBUG, DEBUG_LOG, 0, "end thread");}
开发者ID:AndreasFMueller,项目名称:AstroPhotography,代码行数:12,
示例22: bonjour_tcl_callback////////////////////////////////////////////////////// called by the Tcl event loop when there is data// on the socket used by the DNS service reference////////////////////////////////////////////////////void bonjour_tcl_callback( ClientData clientData, int mask) { DNSServiceRef sdRef = (DNSServiceRef)clientData; // process the incoming data DNSServiceProcessResult(sdRef);}
开发者ID:eviltwinskippy,项目名称:tcl_bonjour,代码行数:13,
示例23: KprZeroconfPlatformCallBackvoid KprZeroconfPlatformCallBack(FskThreadDataHandler handler, FskThreadDataSource source, void* context)#endif{ DNSServiceRef serviceRef = context; DNSServiceErrorType error = kDNSServiceErr_NoError; error = DNSServiceProcessResult(serviceRef); if (error) FskDebugStr("!!! KprZeroconfPlatformCallBack error %d", error);}
开发者ID:dadongdong,项目名称:kinomajs,代码行数:9,
示例24: mdns_event_cbstatic voidmdns_event_cb(evutil_socket_t fd, short flags, void *data) { DNSServiceErrorType err; err = DNSServiceProcessResult(mdns_sdref_main); if (err != kDNSServiceErr_NoError) DPRINTF(E_LOG, L_MDNS, "DNSServiceProcessResult error %d/n", err);}
开发者ID:ejurgensen,项目名称:forked-daapd,代码行数:10,
示例25: handleEvents_ void handleEvents_( DNSServiceRef service, const int32_t timeout = -1 ) { assert( service ); if( !service ) return; const int fd = DNSServiceRefSockFD( service ); const int nfds = fd + 1; while( !handled_ ) { fd_set fdSet; FD_ZERO( &fdSet ); FD_SET( fd, &fdSet ); struct timeval tv; tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; const int result = ::select( nfds, &fdSet, 0, 0, timeout < 0 ? 0 : &tv ); switch( result ) { case 0: // timeout return; case -1: // error LBWARN << "Select error: " << strerror( errno ) << " (" << errno << ")" << std::endl; if( errno != EINTR ) { withdraw(); handled_ = true; } break; default: if( FD_ISSET( fd, &fdSet )) { const DNSServiceErrorType error = DNSServiceProcessResult( service ); if( error != kDNSServiceErr_NoError ) { LBWARN << "DNSServiceProcessResult error: " << error << std::endl; withdraw(); handled_ = true; } } break; } } handled_ = false; }
开发者ID:marwan-abdellah,项目名称:Lunchbox,代码行数:55,
示例26: do_smb_resolvestatic void do_smb_resolve(struct mdns_smbsrv_result *browsesrv){ DNSServiceRef mdns_conn_sdref = NULL; int mdnsfd; int fdsetsz; int ret; fd_set *fdset = NULL; struct timeval tv; DNSServiceErrorType err; TALLOC_CTX * ctx = talloc_tos(); err = DNSServiceResolve(&mdns_conn_sdref, 0 /* flags */, browsesrv->ifIndex, browsesrv->serviceName, browsesrv->regType, browsesrv->domain, do_smb_resolve_reply, NULL); if (err != kDNSServiceErr_NoError) { return; } mdnsfd = DNSServiceRefSockFD(mdns_conn_sdref); for (;;) { if (fdset != NULL) { TALLOC_FREE(fdset); } if (mdnsfd < 0 || mdnsfd >= FD_SETSIZE) { errno = EBADF; break; } fdsetsz = howmany(mdnsfd + 1, NFDBITS) * sizeof(fd_mask); fdset = TALLOC_ZERO(ctx, fdsetsz); FD_SET(mdnsfd, fdset); tv.tv_sec = 1; tv.tv_usec = 0; /* Wait until response received from mDNS daemon */ ret = sys_select(mdnsfd + 1, fdset, NULL, NULL, &tv); if (ret <= 0 && errno != EINTR) { break; } if (FD_ISSET(mdnsfd, fdset)) { /* Invoke callback function */ DNSServiceProcessResult(mdns_conn_sdref); break; } } TALLOC_FREE(fdset); DNSServiceRefDeallocate(mdns_conn_sdref);}
开发者ID:AllardJ,项目名称:Tomato,代码行数:55,
示例27: TXTRecordCreate//methods to implement for concrete implementationsbool CZeroconfWIN::doPublishService(const std::string& fcr_identifier, const std::string& fcr_type, const std::string& fcr_name, unsigned int f_port, std::map<std::string, std::string> txt){ DNSServiceRef netService = NULL; TXTRecordRef txtRecord; TXTRecordCreate(&txtRecord, 0, NULL); CLog::Log(LOGDEBUG, "CZeroconfWIN::doPublishService identifier: %s type: %s name:%s port:%i", fcr_identifier.c_str(), fcr_type.c_str(), fcr_name.c_str(), f_port); //add txt records if(!txt.empty()) { for(std::map<std::string, std::string>::const_iterator it = txt.begin(); it != txt.end(); ++it) { CLog::Log(LOGDEBUG, "CZeroconfWIN: key:%s, value:%s",it->first.c_str(),it->second.c_str()); uint8_t txtLen = (uint8_t)strlen(it->second.c_str()); TXTRecordSetValue(&txtRecord, it->first.c_str(), txtLen, it->second.c_str()); } } DNSServiceErrorType err = DNSServiceRegister(&netService, 0, 0, fcr_name.c_str(), fcr_type.c_str(), NULL, NULL, htons(f_port), TXTRecordGetLength(&txtRecord), TXTRecordGetBytesPtr(&txtRecord), registerCallback, NULL); if(err != kDNSServiceErr_ServiceNotRunning) DNSServiceProcessResult(netService); if (err != kDNSServiceErr_NoError) { // Something went wrong so lets clean up. if (netService) DNSServiceRefDeallocate(netService); CLog::Log(LOGERROR, "CZeroconfWIN::doPublishService CFNetServiceRegister returned (error = %ld)/n", (int) err); if(err == kDNSServiceErr_ServiceNotRunning) { CLog::Log(LOGERROR, "CZeroconfWIN: Zeroconf can't be started probably because Apple's Bonjour Service isn't installed. You can get it by either installing Itunes or Apple's Bonjour Print Service for Windows (http://support.apple.com/kb/DL999)"); CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Error, "Failed to start zeroconf", "Is Apple's Bonjour Service installed? See log for more info.", 10000, true); } } else { CSingleLock lock(m_data_guard); m_services.insert(make_pair(fcr_identifier, netService)); } TXTRecordDeallocate(&txtRecord); return err == kDNSServiceErr_NoError;}
开发者ID:SirTomselon,项目名称:xbmc,代码行数:52,
示例28: DNSServiceProcessResultvoid BonjourServiceResolver::bonjourSocketReadyRead(){ // If you remove the following line, this breaks on Lion. Why, you ask? // Because this will then be done in the socket notifier destructor, which // will be run in another thread because of QHostInfo::lookupHost(). // Very likely a bug in the Qt multi-threading code. d->bonjourSocket->setEnabled(false); const DNSServiceErrorType err = DNSServiceProcessResult( d->dnssref ); if( err != kDNSServiceErr_NoError ) { error( err ); }}
开发者ID:UpsilonAudio,项目名称:charger,代码行数:14,
示例29: dnssdUpdatestatic voiddnssdUpdate(void){ DNSServiceErrorType sdErr; /* Service discovery error */ if ((sdErr = DNSServiceProcessResult(DNSSDMaster)) != kDNSServiceErr_NoError) { cupsdLogMessage(CUPSD_LOG_ERROR, "DNS Service Discovery registration error %d!", sdErr); dnssdStop(); }}
开发者ID:AndychenCL,项目名称:cups,代码行数:14,
注:本文中的DNSServiceProcessResult函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DNSServiceRefDeallocate函数代码示例 C++ DNBLogThreadedIf函数代码示例 |