MonobjcMonobjc Documented Class Library
PortForNameHost Method (portName, hostName)
NamespacesMonobjc.FoundationNSPortNameServerPortForNameHost(NSString, NSString)

Looks up and returns the port registered under the specified name on a specified host.

Original signature is '- (NSPort *)portForName:(NSString *)portName host:(NSString *)hostName'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSPort PortForNameHost(
	NSString portName,
	NSString hostName
)
Public Overridable Function PortForNameHost ( _
	portName As NSString, _
	hostName As NSString _
) As NSPort
public:
virtual NSPort^ PortForNameHost(
	NSString^ portName, 
	NSString^ hostName
)
Parameters
portName (NSString)
The name of the desired port.
hostName (NSString)
The name of the host. hostName is an Internet domain name (for example, “sales.anycorp.com”). If hostName is nil or empty, the local host is checked.
Return Value
The port associated with portName on the host hostName. Returns nil if no such port exists.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)