In the how do I FAQ
there's a section AJAX with topics about how to use AJAX to send and retrieve values from a web server (php in the case of those examples I think).
There is a websocket plugin (socket) that you can find in the Plugins for Construct 2
forum. Apart from the original topic of the plugin, there is not really documentation for it, but it is a basic socket.
You'll have to code your server-side outside of construct2 though.This tutorial
might bring you some technical informations and links to other useful documentation about the use of CC and C2.
I strongly suggest you to read the blog article about C2's architecture that is linked in this tutorial. It's well written and clear.
I think those links should get you going for a while and answer most of your questions.
If you still have some, just post them out.