Thanks for the help so far, it has been really helpful. I have a couple of other questions which I hope you can help me with or give me some guidelines.
We are still working on the same pokerclient as mentioned earlier and I have been able to send and recieve the information from/to the server/client and the framework is very good and easy, however I need to setup a different approach right now.
The only thing that the clients should do is:
1. Connect and Disconnect to the server
2. Send its action to the server (Call, Raise, Fold etc.)
3. Animate based on the data recieved from the server
The server should:
1. Store all connections from the client
2. Send the appropiate data to each client
I was wondering what a good approach would be here using NetworkComms Framwork?
Right now I send and recieve data from and to the server a little bit sloppy and I would like to redo that part so any input here on how to handle the client connections etc. would be highly appreciated!
Good to hear you are making progress. The best answer to your question is that you can decide what the best communication configuration is and then use Networkcomms.Net to implement it. You are not really restricted to one configuration over another. A very brief example of what you might be able to use is:
List<IPEndPoint> connectedClients = new List<IPEndPoint>();
NetworkComms.AppendGlobalIncomingPacketHandler<string>("InitialClientConnect", (header, connection, message) =>
//If a client sends a InitialClientConnect packet we add them to the connectedClients list
//At some future point we can send something to all connected clients
string messageToSend = "helloWorld";
foreach (IPEndPoint endPoint in connectedClients.ToList())
TCPConnection.GetConnection(new ConnectionInfo(endPoint)).SendObject("TestMessage", messageToSend);
catch (CommsException ex)
//An exception occured. Inspect the exception 'ex' to determine what went wrong
//It might be the client is no longer available