MonobjcMonobjc Documented Class Library
PortForNameHostNameServerPortNumber Method (portName, hostName, portNumber)
NamespacesMonobjc.FoundationNSSocketPortNameServerPortForNameHostNameServerPortNumber(NSString, NSString, UInt16)

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 nameServerPortNumber:(uint16_t)portNumber'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSPort PortForNameHostNameServerPortNumber(
	NSString portName,
	NSString hostName,
	ushort portNumber
)
Public Overridable Function PortForNameHostNameServerPortNumber ( _
	portName As NSString, _
	hostName As NSString, _
	portNumber As UShort _
) As NSPort
public:
virtual NSPort^ PortForNameHostNameServerPortNumber(
	NSString^ portName, 
	NSString^ hostName, 
	unsigned short portNumber
)
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”) or IP address (IPv4 or IPv6). If hostName is nil or empty, the local host is checked. If hostName is @"*", all hosts on the local network are checked.
portNumber (UInt16)
The portNumber parameter is ignored.
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)