“I am thinking of adding server like photon server for cocos.”
Photon is already compatible to cocos2d-x and the combination cocos2d-x and photon is already used successfully for the development of several games.
The Photon C++ client SDKs even ship with a demo, for which cocos2d-x is used as the graphics engine.
So why would you want to invest the time to build another client-server solution, if you explicitly say, that you want it to be like Photon, anyway?
“Would it be much difficult or I can do it?”
There have been several dozens of developer manyears invested into making Photon what it is today. The development of the code, that evolved to Photon, has started 15 years ago and for the last 10 years most of the time the development team has been consisting of more than 10 concurrent programmers. So doing something like this as a single developer could be a “bit” too much work for just 7-8 months, especially without experience in this area of development.