is it okay to have close guy friends in a relationship?

Sevina
I have a guy friend who I'm really close with and have known for years. We went on one date years ago and it didn't work out. We're now just really good friends and have had other relationships since. We are still text each other and stuff from time to time even though I have a boyfriend but it's never flirting or anything promiscuous. 
My boyfriend knows me and the guy friend/ex still text but I'm wondering if it's okay to be close to a guy who isn't your boyfriend??