I'm totally new to networking, only read the library docs and played a bit with some of the examples.
A client computer writes a string to the server after a keyPressed event.
The server then writes to all the other clients.
What I wanted to know is, can the server react to a clients update immediately? Like with a network listener?
What i'm worried about is the possibility of two clients sending a message almost simultaneously.
If the server will only check for messages using available() inside draw(), then there's much more likelihood that more than one message will have been received from multiple clients. If this is the only way, how would I send multiple sets of data to the clients?
I know the clients use clientEvent() to listen for a network update.
Is there an equivalent for the server? It seems that serverEvent() only listens for when a client joins the network, not when data is sent.
Any help appreciated. If anyone has any experience of this kind of network situation any tips gratefully received.
I'm not asking for anyone to write all my code for me, just to give a few pointers.
1