How to add labels to sockets?

I'd like to add a label to each of the socket, like Blender does. What should I do?