1
I’m trying to create a local multiplayer system, where will have a script for the "server" and several "clients" can connect. For now I will use in a simple test application, where users will create their accounts, log in and on the screen of each user who is connected will appear the list of everyone who is connected. The list would be changed in all clients when any user logged in or out.
The way I was doing, when the client wanted to do some action, like login for example, he would write a string in a text file, for example 'login user password'. Hence it had the server script that was in an infinite loop reading all these files (each open client would be 1, not necessarily the connected user) and writing the answer in the same file, for example:
Text file:
client_request:login usertest 1234
server_answer:wrong_password
Only I was slow, with some problems and I think I think I had been recording and reading text files non-stop. I wanted some idea of how I can do this in a better way, without using files !
If I haven’t made myself clear I try to explain again.