nametoport
fn
int nametoport(string name, out int port, out int proto)Resolves a service name to its port number and protocol.
Parameters
name | The service name (e.g. "http"). |
port | Receives the port number. |
proto | Receives the protocol number. |
Returns
0 on success, -1 if not found.