Memberlist documentation?

sorry if this isn’t the right place for this question.
I’m trying to learn how the memberlist work, but the golang.org memberlist documentation doesn’t have much information in it.
I’m trying to understand what’s the full state exchange and what is the state exactly?

when I tried a code example I’ve found for the memberlist, I saw that there’s 2 ports that are made, first one I found that it’s from the BindPort, but what are the other port (similar to 45272) for? is it the AdvertisePort?