TROZeroConfService Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for RemObjects SDK for Delphi
This page is generated from external data, please do not update

InterfacesClassesAliasesImplements

Contents

Overview

The TROZeroConfService class is used to hold information about discovered services in the ZeroConf environment. A TROZeroConfBrowser uses it to represent the service when informed about added and removed services via OnServiceAdded and OnServiceRemoved. You may use this class to gain access to specific information about discovered services with the Resolve and TryResolve methods.

Note: Take a look at the BonjourDiscovery sample shipped with the RemObjects SDK to see service discovery in action.


Location

uROZeroConf.pas


Properties

Address

Holds the server IP address. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property Address: string read


DefEngine

The value of the TROZeroConfEngine which is used choose an IZeroConfResolveStrategy implementation.



property DefEngine: TROZeroConfEngine read


Domain

Holds information about the service domain.



property Domain: UnicodeString read


FullDomainName

Holds the full name of the domain. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property FullDomainName: UnicodeString read


HostTarget

Holds the target server host name. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property HostTarget: UnicodeString read


IP4Address

Holds the server IP address in an IPv4 form (empty if ResolvedIP4 if False). If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property IP4Address: string read


IP6Address

Holds the server IP address in an IPv6 form (empty if ResolvedIP6 if False). If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property IP6Address: string read


Port

Specifies the port that is used by the server that hosts the current service. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property Port: cardinal read


Resolved

Indicates if the server adress and port are already resolved.



property Resolved: Boolean read


ResolvedEngine

Reports which TROZeroConfEngine was used to resolve the service. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property ResolvedEngine: TROZeroConfEngine read


ResolvedIP4

Indicates if the server adress is in IPv4 form. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property ResolvedIP4: boolean read


ResolvedIP6

Indicates if the server adress is in IPv6 form. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property ResolvedIP6: boolean read


ServiceName

Holds the name of the service.



property ServiceName: UnicodeString read


ServiceType

Holds the service type name.



property ServiceType: UnicodeString read


TextRecord

Returns a string in form of name=value pairs delimited by carriage returns and line feeds. It holds additional information received from the server and may be used to obtain additional information like server channel and message type etc. If the host is not resolved yet, the Exception 'Not resolved yet' will be raised when you try access this property.



property TextRecord: UnicodeString read


Instance Methods

constructor Create

Initializes the instance with the given values.


constructor Create(aBrowser: TROZeroConfBrowser; aDefEngine: TROZeroConfEngine; aDomain: UnicodeString; aServiceName: UnicodeString; aServiceType: UnicodeString; aIpType: TIpType)


Parameters:

  • aBrowser: Browser that provides information
  • aDefEngine: Engine used for discovering
  • aDomain: Service domain
  • aServiceName: Service name
  • aServiceType: Service type
  • aIpType: TIpType value


Resolve ()   overload

Resolves a domain and the service type and -name to a real address and port with a 10 second timeout. If the resolve operation was terminated by timeout or if the server returns an error, an Exception will be raised.


procedure Resolve


Resolve (integer)   overload

Resolves a domain and the service type and -name to a real address and port with the provided timeout (in seconds). If the resolve operation was terminated by timeout or if the server returns an error, an Exception will be raised.


procedure Resolve(aTimeout: integer)


Parameters:

  • aTimeout:


TryResolve (): boolean   overload

Tries to resolve a domain and the service type and -name to a real address and port with a 10 second timeout. If the resolve operation was terminated by timeout or if the server returns an error, this method will return False.


function TryResolve: boolean


TryResolve (integer): boolean   overload

Tries to resolve a domain and the service type and -name to a real address and port with the provided timeout (in seconds). If the resolve operation was terminated by timeout or if the server returns an error, this method will return False.


function TryResolve(aTimeout: integer): boolean


Parameters:

  • aTimeout:


See Also


Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox