Since you plan to use TCP (because you want state), you need to develop a strategy. You will get a lot of information about establishing a connection and moving some data back and forth. Google will give you more than you can handle. Without doing all the work, here are a few steps to get your bearings.
1) Registration of connections. When a client comes to the network and wants to communicate with the server, you must first say "Hey, I'm here and I want to play dice." This initial handshake may be a connection identifier that is used for heart rate and / or transactions. The server will use this to identify the data and the corresponding stream, if they are open.
2) Heart beat. Now that the client has registered on the server, the client is responsible for giving a heart beat, saying that he is still there and still plans to continue working. Usually every 3 to 10 seconds is good.
3) Develop a Request / Response protocol - there will be a formal process for βeach teamβ. This formal process will include a connection identifier as well as a request identifier. The client will not accept the response if he does not receive the corresponding request identifier. In addition, each request will require a successful or unsuccessful response to determine if it matches the API or not. Inside the request, a command or action will be executed. Some people use int to send the command identifier, then use the id switch to call the entry point method (cmd id = 1 is connect (), cmd id = 2 - rolldice (), etc.). You can include an additional payload that identifies the result from the command.
In short, 1 is a handshake, 2 is a save, and 3 is a data transfer back and forth.
Now, whether you need to use a socket or WCF, I would recommend having a basic understanding of TcpClient programming, and then starting with WCF. You will be amazed at how easy the socket programming is, but the overhead is a killer. There is nothing to intimidate. This is a lot of work in coordinating calls, flows, and not to mention security. WCF, on the other hand, shaves some of this overhead.
I would check this question ...
How to use socket client with WCF service (net.tcp)?