Flowdock
getservbyname(p1, p2 = v2) public

Obtains the port number for service_name.

If protocol_name is not given, “tcp” is assumed.

Socket.getservbyname("smtp")          #=> 25
Socket.getservbyname("shell")         #=> 514
Socket.getservbyname("syslog", "udp") #=> 514
Show source
Register or log in to add new notes.