52 DNSServiceRefDeallocate(
fDNSRef);
64 Warning(
"ResolveBonjourRecord",
"resolve already in process");
68 DNSServiceErrorType err = DNSServiceResolve(&
fDNSRef, 0, 0,
74 if (err != kDNSServiceErr_NoError) {
75 Error(
"ResolveBonjourRecord",
"error in DNSServiceResolve (%d)", err);
81 Error(
"ResolveBonjourRecord",
"invalide sockfd");
98 args[0] = (
Long_t) hostInfo;
101 Emit(
"RecordResolved(TInetAddress*,Int_t)", args);
114 DNSServiceErrorType err = DNSServiceProcessResult(
fDNSRef);
115 if (err != kDNSServiceErr_NoError)
116 Error(
"BonjourSocketReadyRead",
"error in DNSServiceProcessResult");
124 DNSServiceErrorType errorCode,
const char *,
125 const char *hostTarget,
UShort_t port,
130 if (errorCode != kDNSServiceErr_NoError) {
131 ::Error(
"TBonjourResolver::BonjourResolveReply",
"error in BonjourResolveReply");
134 resolver->
fPort = ntohs(port);
R__EXTERN TSystem * gSystem
const char * GetReplyDomain() const
const char * GetServiceName() const
const char * GetRegisteredType() const
void BonjourSocketReadyRead()
The Bonjour socket is ready for reading.
Int_t ResolveBonjourRecord(const TBonjourRecord &record)
Resolve Bonjour service to IP address and port.
void RecordResolved(const TInetAddress *hostInfo, Int_t port)
Emit RecordResolved signal.
TInetAddress fHostAddress
TBonjourResolver()
Default ctor.
TFileHandler * fBonjourSocketHandler
static void DNSSD_API BonjourResolveReply(DNSServiceRef, DNSServiceFlags, UInt_t, DNSServiceErrorType, const char *, const char *, UShort_t, UShort_t, const char *, void *)
Static Bonjour resolver callback function.
virtual ~TBonjourResolver()
Cleanup.
virtual void Add()
Add file event handler to system file handler list.
This class represents an Internet Protocol (IP) address.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.