Not exactly. They, like other pack animals, know that a strong bond between pack members means that they are safer. By following your commands, if you are a strong leader, that the pack will maintain its stability. Dogs and cats do produce some similar chemical impulses to humans, though they are a more primitive form. Snakes do not.
One of the largest problems we have as humans is trying to anthropomorphize our pets and end up treating them like they are humans. This often ends up bad. A dog is a dog, a cat is a cat, and a snake is a snake. Though, dogs and cats have been domesticated for a very long time, and it is only common sense to know that an animal that has been domesticated for near fifteen thousand years will end up picking up some of the basic character traits of their masters. But this still does not mean that dogs are humans. Nor should they be treated as such.
Your dog does not want or need a friend, they need a strong leader, same as a cat. Snakes want neither. They only want food and a way to pass on their DNA.