You are here : python_3socketsocketgetservbyname

socket.getservbyname() - socket

Translate an Internet service name and protocol name to a port number for that
service.  The optional protocol name, if given, should be 'tcp' or
'udp', otherwise any protocol will match.


Syntax

socket.getservbyname(servicename[, protocolname])


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference