What does it mean when a guy friend keeps touching you?

I have a close male friend who has recently started being affectionate with me. Like suddenly asking if he can get a hug or if he can hold me, touching my hair, holding my hand, etc. We have both made it clear from the beginning that we are both looking for friendship. When I brought it up again that we are just friends and nothing more, he agreed with me and said he was just giving me a friendly hug. And he even knows there is another guy I am talking to and said he is happy for me. So I am really confused as to the sudden change in his behavior and what all this touching means.
What does it mean when a guy friend keeps touching you?
Post Opinion