Python Network Programming Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

Getting ready

If you know the port number of a network service, you can find the service name using the getservbyport() socket class function from the socket library. You can optionally give the protocol name when calling this function.