I want to create a multiplayer game which can be played on different devices connected through wifi.
The type of network connection for your different devices is irrelevant. The crucial element is the client<->server connection. Your client games can be coded in C2, but setting up the server (and connections to it) requires another platform.
As Kyatric says, you'll find further advice by checking the "Multiplayer/Networking" section of the how do I FAQ.