Socket.getservbyport(port [, protocol_name]) => service
Class Public methods
Obtains the port number for port.
If protocol_name is not given, âtcpâ is assumed.
1 2 3 | Socket.getservbyport( 80 ) #=> "www" Socket.getservbyport( 514 , "tcp" ) #=> "shell" Socket.getservbyport( 514 , "udp" ) #=> "syslog" |
Please login to continue.