Well, my first attempt was to use a direct socket connection, because my use case is primary at home within the same network. Then my thoughts went into the direction to use a server and communicate with the server using a JSON API which lead me to web sockets because of the lack of polling. As you see, it's straight forward :P
What I want to create is a networked memory game. An extended version of the sample and to be able to play with at least two players (in the first version).